Quantcast
Channel: Outlook for Developers forum
Viewing all 6421 articles
Browse latest View live

Issue Using C# to Get RTF Text From Clipboard to Outlook With Formatting and Without Encoding Tags

$
0
0

I have created a little application that gathers data from various text boxes and then combines the data into a formatted richTextBox.  A person using the tool asked if I could then add a button that would allow that text (with formatting) to be copied and pasted into an Outlook Email.  When I do this, I can get the text into an email, but I either strip out the formatting or I get all the RTF encoding tags to come along with it. 

I have tested to see that the copy of the data from the richTextBox has indeed made it to the clipboard correctly.  This has been verified by the fact that I can manually press "ctrl" + "v" and I can past the text with proper formatting into the mail body.

I do know that I can brute force things by trying to manually wrap HTML tags around my textBox fields and then pipe that into an HTMLBody property.  In fact I can get a lot of things to work with the HTMLBody property, but while it is nice that will work, I feel that I must be missing something really simple while trying to work with RTF.

I currently am pasting (using the Clipboard.GetText(TestDataFormat.RTF)) the RTF data into the Body property of the mail item.  This is bringing in all the RTF encoding tags.  I have tried to paste this directly into the RTFBody of the mail item, yet an execption gets thrown when executed.  Oddly, though, if I change RTFBody to HTMLBody, I do not get the exception, but I still have the RTF encoding tags in it.  Though if I feed the HTMLBody property straight, HTML text with the encoding tags, it will render properly.

This has me confused then why if I feed HTMLBody HTML text with the encoding tags that it will render, but if I try and do the same for RTFBody and feed it RTF text with encoding tags it still throws an exception.  Any help in the matter would be greatly appreciated.  I have included the code snippet below for sending the richTextBox information to the clipboard and then attempting to retrieve it and paste it into an Outlook email.

Thanks for the help.

Some pertinent information:

Blend for Visual Studio 2015 CTP6 (I switched from VS2012 as intellisense was added to Blend in 2015)

Because of this Systems.Windows.Forms is not in use

        private void buttonEmail_Click(object sender, RoutedEventArgs e)
        {

            //Copy richTextBox information to Clipboard
            Clipboard.Clear();
            richTextBox.SelectAll();
            richTextBox.Copy();

            //Get current date to add to email subject line
            DateTime myNewDate = new DateTime();
            myNewDate = DateTime.Now;

            //Create Email
            Outlook.Application myNewApplication = new Outlook.Application();
            Outlook.MailItem myNewMailIoI = myNewApplication.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;


            myNewMailIoI.To = " ";  //An attempt to ensure that the focus moves down to the body field
            myNewMailIoI.Subject = "IoI - " + myNewDate.Date.ToString("d");
            myNewMailIoI.BodyFormat = Outlook.OlBodyFormat.olFormatRichText;

            //Pasting data into body of email
            myNewMailIoI.Body = Clipboard.GetText(TextDataFormat.Rtf);  //This will past the text with encoding tags into email

            //If this section is uncommented, it will add a properly formatted HTML text to the email
            //myNewMailIoI.BodyFormat = Outlook.OlBodyFormat.olFormatHTML;
            //myNewMailIoI.HTMLBody = "<p>This stinks!!!</p>" + "<p style='color: green; font-size:10pt; font-family:arial'>different font and color</p>";

            myNewMailIoI.Display();     //Allow for window to be minimized
            myNewMailIoI.Display(true);

        }


VBA ThisOutlookSession not working

$
0
0

I have been using the below VBA code for a few years now to automatically BCC myself in emails I send from Outlook. I've not had any problems with this code until now. I've started a new job in a new company and the code just isn't running. My security settings are low enough for this so I'm not sure what is stopping it. Would anyone have any thoughts?

Thanks!

Private Sub Application_ItemSend(ByVal Item As Object, _
                                 Cancel As Boolean)
    Dim objRecip As Recipient
    Dim strMsg As String
    Dim res As Integer
    Dim strBcc As String
    On Error Resume Next
 
    ' #### USER OPTIONS ####
    ' Eleanor.Coates@technicolor.com
    ' or resolvable to a name in the address book
    strBcc = "Eleanor.Coates@technicolor.com"
 
    Set objRecip = Item.Recipients.Add(strBcc)
    objRecip.Type = olBCC
    If Not objRecip.Resolve Then
        strMsg = "Could not resolve the Bcc recipient. " & _
                 "Do you want to send the message?"
        res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
                "Could Not Resolve Bcc")
        If res = vbNo Then
            Cancel = True
        End If
    End If
 
    Set objRecip = Nothing


User add signature Event

$
0
0

Hello,

I have yesterday ask is there a way to find the signature on the mail body. I now know there no correct way to do that so. I've try other way like :

static public List<string> ReadSignature() {    if (diInfo.Exists) {        FileInfo[] fiSignature = diInfo.GetFiles("*.txt");        if (fiSignature.Length > 0) {            List<string> signature = new List<string>();            foreach (FileInfo signFile in fiSignature) {                using (StreamReader sr = new StreamReader(signFile.FullName, Encoding.Default)) {                    signature.Add(sr.ReadToEnd());                }            }            return signature;        }    }    return null;
}static public string AppendSignature(string body, string textToAppend) {    List<string> signatures = ReadSignature();    int index = -1;    string useSignature = string.Empty;    for (int i = 0; i < signatures.Count; i++) {        string signature = signatures[i];        while (signature.LastIndexOf("\n"> signature.Length - 3 ||           signature.LastIndexOf("\r"> signature.Length - 3) {            signature = signature.Substring(0, signature.Length - 2);        }        index = body.LastIndexOf(signature);        if (index > 0) {            useSignature = signature;            break;        }    }    if (index == -1) { return body + textToAppend; }    index = body.Substring(0, index).LastIndexOf("<p");    return body.Substring(0, index) +  // Ce qu'il y a avant la signature             textToAppend +              // le texte à ajouter            body.Substring(index);      // la signature
}

But it didn't work on all case. So I wanted to put a string like <span id="Signature"></span>. I think of two way to do that :

1- On New Mail

2- On Add signature

The better way is the second one. So i looking for an event raise wen the use add signature.

Outlook Email - Text or HTML format for Recepient

$
0
0

We have an outlook add in which sends some HTML in every email that goes out. We need to add mime type header to make sure that it renders the text template if recipient view settings are text email and not HTML.

Any ideas on how it can be achieved.

Thanks.

 

How to create a Self-Signed Digital Certificate in Office 2013

$
0
0

In office 2010 we had a "Digital Certificate for VBA Projects" tool for creating self-signed certificates.  How do we do this with the newer Office 2013 suite?

Problem with digital places in Outlook 2010 reminder

$
0
0

Hello,

we develop an outlook 2010 addin with vsto. On some machines we have a problem with the representation of the minute digits in the reminder dialog. When our addin is active, the minute digits have twelve decimal places. We use RadControls for Winforms from Telerik to have theme able controls.

Regards

Nico


to take backup of outlook pst file automatically even if outlook is in use

$
0
0

Hello,

I want to develop utility to take backup of outlook pst file automatically even if outlook is in use.  When outlook is closed then I am able to copy pst file but when outlook is in use then its showing error "The process can not access the file because another process has locked a portion of the file".  

Does anyone have idea how to programmatically copy pst file even if outlook is open? Another question is does anyone have idea of incremental backup of pst file?

Please give some idea if you know the answer.... Its really very urgent..

Akshay Shah

Extract Outlook Address to Excel

$
0
0

I would like to know if there is any Excel VBA code that can extract the  current user's email address and/or name from outlook to excel.

I am developing a excel VBA application and would to find some code which would extract the current user's detail in excel.

any help would be appreciated.

many thanks

Peter 


Starting Oulook programmatically - What events fire?

$
0
0

I need to implant code somehow into Outlook that will initialize public/shared folders when it is started programmatically.

Are any events fired when Outlook starts this way?

or Can an add in perform a task when Outlook is started this way?

I have no access to the application that starts Outlook. Their support has already given up on this.

Need to release account and session at end of Sub (vb.net) after referencing in Outlook addin?

$
0
0

Hi there,

I have a question about whether it is necessary to release both the account and session if I have referenced them in a sub within my Outlook addin.  For example in a start up process I use the below to retrieve the email address of the first user account.

Dim olApp As Outlook.Application = Application
Dim session As Outlook.NameSpace
Dim accounts As Outlook.Accounts
Dim acc As Outlook.Account

session = olApp.Session
accounts = session.Accounts
acc = accounts(1)

Try
  username = acc.CurrentUser.Address
Catch ex As Exception
  username = ""
End Try

If username = "" Or username.Contains("@") = False Then
  Try
    username = acc.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
  Catch ex As Exception
    username = ""
  End Try
End If

Do I need to release (using Marshal.ReleaseComObject) all of the above, aside from olApp which I usually just set to Nothing?

In other Subs I also use a similar method to reference the root folder of the delivery store for that account:

Dim olApp As Outlook.Application = Application
Dim session As Outlook.NameSpace = olApp.Session
Dim accounts As Outlook.Accounts
Dim acc As Outlook.Account
Dim store As Outlook.Store
Dim accountFolder As Outlook.Folder = Nothing

session = olApp.Session
accounts = session.Accounts

'Loop through each account to test whether it is account relating to currently stored username
For Each acc In accounts
  Try
    tempAccStr = acc.CurrentUser.Address
  Catch ex As Exception
    tempAccStr = ""
  End Try

  If tempAccStr = "" Or tempAccStr.Contains("@") = False Then
   Try
     tempAccStr = acc.CurrentUser.AddressEntry.GetExchangeUser.PrimarySmtpAddress
   Catch ex As Exception
     tempAccStr = ""
   End Try
  End If

  'If matches username, retrieve store and rootfolder of store
  If username = tempAccStr And tempAccStr <> "" Then
    store = acc.DeliveryStore
    accountFolder = store.GetRootFolder()
    Exit For
  End If
Next

Should I be releasing each acc when looping over the accounts, and at the end of this sub, should I release accountFolder, store, accounts, and session?  I read quite a lot of conflicting info online about this, most is related to specific mailItem objects and not always around the larger accounts and sessions...

Any help would be really useful!

Thanks,

Tom

How to select attachments programmatically?

$
0
0

Hello,

It is possible to get the selected attachments from the below,

Microsoft.Office.Interop.Outlook.AttachmentSelection explorerAttachments = Application.ActiveExplorer().AttachmentSelection; Microsoft.Office.Interop.Outlook.AttachmentSelection inspectorAttachments = Application.ActiveInspector().AttachmentSelection;

But how can attachments be selected programmatically?
Any alternative suggestion is also appreciated.

I am using, VS 2010, C#, Outlook 2007/2010.

I was trying the below as an alternative for the above, in Outlook 2010, but it failed with the error,
"Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"

Any ideas, on this also, please?

Microsoft.Office.Interop.Outlook.Explorer activeExplorer = Application.ActiveExplorer();
activeExplorer.CommandBars.ExecuteMso("SelectAllAttach");
activeExplorer.CommandBars.ExecuteMso("ShowMessage");

Two Ribbon in a project

$
0
0

Hi,

I've two problem in outllook addins application.

First Problem:

1.I used two ribbon and want to display one ribbon at the outlook explorer and another one should be display at mail.compose..In the explorer dispaly that ribbon but when user click new mail it does not display another ribbon. Mentioned that in the explorer ribbon have some static checkbox control but in other ribbon have dynamaics checkbox control. Mentioned that i override the ribbon in the thisaddins. I checked the xml of this ribbon but it's does not read the ribbon_load method. Så it does not works. In the load method, according to no of the items (from database) it will create the control.

Second Problem:

2.If i uesd one riboon and want to display in the explorer and mail.compose and with is ribbon i used some dynamics control.problem is that in the explore it does not shown the control but when user click the new mail it shows the controllen. 

it's read the ribbon_load method as well. Så it does works. In the load method, according to no of the items (from database) it will create the control.

I used VS 2010 Outlook addins

Regards

/Shahin

Any help with recovering corrupt PST file?

$
0
0

Hello guys,

I have an 5GB .PST file that is corrupted and I'm unable to recover more than half of the emails on it.

The file was created in Outlook 2010. I copied it on a flash drive, then reset my PC to factory settings (because my PC worked slowly and obviously I had many viruses and malware).

After I copied my files from the flash drive back onto my new configuration.

When I try to open my .pst file, Outlook tells me it is corrupt or cannot be opened and suggests running scanpst.exe. ScanPST could restore only half of all my emails.

Folks, any helpful ideas?

Outlook 2013 and 2010 break PR_CONVERSATION_INDEX and related tracking

$
0
0

Does anybody know how to interpret the changed behavior exhibited by Outlook 2013 and 2010?

It appears that Outlook 2010 and 2013 significantly deviate from existing documentation of the PR_CONVERSATION_INDEX property value and Conversation tracking. They change the GUID contained in the property value, construct invalid timestamps and fail to maintain consistent timestamps between sent and received messages. I started my analysis with Outlook 2007 and noted that it is consistent in maintaining the PR_CONVERSATION_INDEX property between sent messages and replies. It maintains the GUID value, it constructs valid timestamps and PR_CONVERSATION_INDEX property values agree with values transmitted in the Thread-index internet mail headers.

 

However, Outlook 2010 and 2013 deviate from Microsoft's documentation of conversation tracking.

 

The following exchange was between Outlook 2007 and Outlook 2010:

 

Sent Message From Machine 1 Outlook 2007 Sent Items Folder:

Conversation Index has 1 Timestamps, Hex string is:

01D046C6FC06C85C39B2C024428381B13C0C5C3FDEB4

{C85C39B2-C024-4283-81B1-3C0C5C3FDEB4} Date/Time of 2/12/2015 8:22:43 AM

 

Received Message From Machine 2 Outlook 2010 Inbox Folder:

Conversation Index has 1 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F9

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM

 

Base 64 decoded Thread-Index header has 1 Timestamps, Hex string is:

01D046C6FC06C85C39B2C024428381B13C0C5C3FDEB4

{C85C39B2-C024-4283-81B1-3C0C5C3FDEB4} Date/Time of 2/12/2015 8:22:43 AM

 

First Response Message From Machine 2 Outlook 2010 Sent Items Folder:

Conversation Index has 2 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F99CE2A76940

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 11/11/1843 9:46:42 AM retrieved from Response 0

 

Second Response Message Received From Machine 2 Outlook 2010 Inbox Folder:

Conversation Index has 3 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F902CB36D9B802DF293170

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 1/7/1831 11:22:11 AM retrieved from Response 0 Date/Time of 1/22/1831 2:12:08 AM retrieved from Response 1

 

Base 64 decoded Thread-Index header has 3 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F99CE2A76940800001CCA0

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 11/11/1843 9:46:42 AM retrieved from Response 0 Date/Time of 11/11/1843 9:53:08 AM retrieved from Response 1

 

Third Response Message From Machine 2 Outlook 2010 Sent Items Folder:

Conversation Index has 4 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F902CB36D9B802DF2931709CB557EDE0

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 1/7/1831 11:22:11 AM retrieved from Response 0 Date/Time of 1/22/1831 2:12:08 AM retrieved from Response 1 Date/Time of 11/11/1843 9:59:18 AM retrieved from Response 2

 

The Outlook 2010 receiver assigns a value to the PR_CONVERSATION_INDEX property of the received message that deviates from the value assigned by the Outlook 2007 sender. It fails to maintain the GUID portion of the property and assigns a new GUID. In addition, the timestamp within the newly created 22 byte header of the PR_CONVERSATION_INDEX property yields an invalid date when it is interpreted. The proper value for the property is present in the Thread-index internet header that was received but is ignored by Outlook 2010.  The first response sent by Outlook 2010 is created using the deviant PR_CONVERSATION_INDEX property on the received message and the added delta timestamp for the response is also an invalid date. This odd property value is also included in the Thread-index internet header that accompanies the response received by Outlook 2007. Outlook 2007 complies with the MS documentation and constructs a PR_CONVERSATION_INDEX property for the second response message that incorporates the values it received from Outlook 2010. These values are echoed in the Thread-index internet header that accompanies the second response message that Outlook 2007 sends to Outlook 2010. However, except for the timestamp contained in the 22 byte header, Outlook 2010 ignores the PR_CONVERSATION_INDEX delta timestamps that it receives from Outlook 2007 and creates completely different values for the first response and second response delta timestamps that it saves to the PR_CONVERSATION_INDEX property of the received second response message. 

The delta timestamps in the saved property are clearly different from those contained in the Thread-index internet header of the received message. The conversation tracking between sent messages and replies is broken by Outlook 2010.

 

Outlook 2013 exhibits the same behavior and also breaks conversation

tracking:

 

Sent Message From Machine 1 Outlook 2007 Sent Items Folder:

Conversation Index has 1 Timestamps, Hex string is:

01D046C6FC06C85C39B2C024428381B13C0C5C3FDEB4

{C85C39B2-C024-4283-81B1-3C0C5C3FDEB4} Date/Time of 2/12/2015 8:22:43 AM

 

Received Message From Machine 2 Outlook 2013 Inbox Folder:

Conversation Index has 1 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F9

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM

 

Base 64 decoded Thread-Index header has 1 Timestamps, Hex string is:

01D046C6FC06C85C39B2C024428381B13C0C5C3FDEB4

{C85C39B2-C024-4283-81B1-3C0C5C3FDEB4} Date/Time of 2/12/2015 8:22:43 AM

 

First Response Message From Machine 2 Outlook 2013 Sent Items Folder:

Conversation Index has 2 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F99CE2C2F220

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 11/11/1843 11:25:15 AM retrieved from Response 0

 

Second Response Message Received From Machine 2 Outlook 2013 Inbox Folder:

Conversation Index has 3 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F9027813F960022AB8AAC6

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 1/5/1831 7:41:44 PM retrieved from Response 0 Date/Time of 1/16/1831 8:25:08 PM retrieved from Response 1

 

Base 64 decoded Thread-Index header has 3 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F99CE2C2F220800001D070

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 11/11/1843 11:25:15 AM retrieved from Response 0 Date/Time of 11/11/1843 11:31:45 AM retrieved from Response 1

 

Third Response Message From Machine 2 Outlook 2013 Sent Items Folder:

Conversation Index has 4 Timestamps, Hex string is:

0101D57DF85E9AC7EF5F05554126A5C93D00053A52F9027813F960022AB8AAC69CBDAF2640

{9AC7EF5F-0555-4126-A5C9-3D00053A52F9} Date/Time of 12/24/1830 6:03:22 AM Date/Time of 1/5/1831 7:41:44 PM retrieved from Response 0 Date/Time of 1/16/1831 8:25:08 PM retrieved from Response 1 Date/Time of 11/11/1843 11:34:33 AM retrieved from Response 2

 

Then I reversed the direction of the sent/received messages and the following was obtained from a conversation that originated on Outlook 2010:

 

Sent Message From Machine 1 Outlook 2010 Sent Items Folder:

Conversation Index has 1 Timestamps, Hex string is:

01D046D79B18F300EDCCA68249B887DE701D3A9D08DE

{F300EDCC-A682-49B8-87DE-701D3A9D08DE} Date/Time of 2/12/2015 10:21:42 AM

 

First Response Message Received From Machine 1 Outlook 2010 Inbox Folder:

Conversation Index has 2 Timestamps, Hex string is:

010207F0F0BAA7CC3C304DFC7779E2E37371AC823777011BB28915

{A7CC3C30-4DFC-7779-E2E3-7371AC823777} Date/Time of 2/26/1831 10:52:20 AM Date/Time of 3/4/1831 2:15:28 AM retrieved from Response 0

 

Base 64 decoded Thread-Index header has 2 Timestamps, Hex string is:

01D046D79B18F300EDCCA68249B887DE701D3A9D08DE0000155570

{F300EDCC-A682-49B8-87DE-701D3A9D08DE} Date/Time of 2/12/2015 10:21:42 AM Date/Time of 2/12/2015 10:24:05 AM retrieved from Response 0

 

Second Response Message From Machine 1 Outlook 2010 Sent Items Folder:

Conversation Index has 3 Timestamps, Hex string is:

010207F0F0BAA7CC3C304DFC7779E2E37371AC823777011BB289159C74F12BD0

{A7CC3C30-4DFC-7779-E2E3-7371AC823777} Date/Time of 2/26/1831 10:52:20 AM Date/Time of 3/4/1831 2:15:28 AM retrieved from Response 0 Date/Time of 11/11/1843 10:34:14 AM retrieved from Response 1

 

Third Response Message Received From Machine 1 Outlook 2010 Inbox Folder:

Conversation Index has 4 Timestamps, Hex string is:

010207F0F0BAA7CC3C304DFC7779E2E37371AC823777011BB2891501B1E165E30169D98E2F

{A7CC3C30-4DFC-7779-E2E3-7371AC823777} Date/Time of 2/26/1831 10:52:20 AM Date/Time of 3/4/1831 2:15:28 AM retrieved from Response 0 Date/Time of 3/12/1831 5:18:49 PM retrieved from Response 1 Date/Time of 3/19/1831 9:59:42 PM retrieved from Response 2

 

Base 64 decoded Thread-Index header has 4 Timestamps, Hex string is:

010207F0F0BAA7CC3C304DFC7779E2E37371AC823777011BB289159C74F12BD0800000B730

{A7CC3C30-4DFC-7779-E2E3-7371AC823777} Date/Time of 2/26/1831 10:52:20 AM Date/Time of 3/4/1831 2:15:28 AM retrieved from Response 0 Date/Time of 11/11/1843 10:34:14 AM retrieved from Response 1 Date/Time of 11/11/1843 10:36:47 AM retrieved from Response 2

 

Outlook 2010 exhibited more unusual behavior. For the initial outgoing message that starts the conversation Outlook 2010 created a PR_CONVERSATION_INDEX property that contained a valid timestamp in the 22 byte header. The message received by Outlook 2007 contained a matching PR_CONVERSATION_INDEX property and a matching Thread-index value in the internet header. Outlook 2007 replies to this message and appends a valid delta timestamp to the PR_CONVERSATION_INDEX property for the first response message. So far, so good.  However, when Outlook 2010 receives the first response to its own message with a PR_CONVERSATION_INDEX GUID matching that of the sent message it still assigns a new GUID to the incoming message's PR_CONVERSATION_INDEX property. It also creates an invalid timestamp in the22 byte header and an invalid delta timestamp is appended for the first response. The proper values are present in the Thread-index internet header but are ignored by Outlook 2010. The PR_CONVERSATION_INDEX property of the Outlook 2010 response to Outlook

2007 contains the newly created GUID value along with another invalid delta timestamp for the second response. Outlook 2007 dutifully uses the values that it received to append a delta timestamp to the PR_CONVERSATION_INDEX property of the third response message and these values are reflected in the accompanying Thread-index internet header of the message sent to Outlook 2010. Oddly, when Outlook 2010 receives the third response message it stores a PR_CONVERSATION_INDEX property value that maintains the invalid timestamps that it created in the 22 byte header and the delta timestamp for the first response. However, upon receiving the third response, Outlook 2010 stores different invalid delta timestamps for the second and third response values in the property. 

Even odder is the fact that it altered the second response delta timestamp which it had originated!

 

In a conversation with Outlook 2007, Outlook 2013 exhibits the same unusual behavior as Outlook 2010 as follows:

 

Sent Message From Machine 1 Outlook 2013 Sent Items Folder:

Conversation Index has 1 Timestamps, Hex string is:

01D0479000E57F2A47A540594D9AACC3EF5CDED2AF38

{7F2A47A5-4059-4D9A-ACC3-EF5CDED2AF38} Date/Time of 2/13/2015 8:21:40 AM

 

First Response Message Received From Machine 1 Outlook 2013 Inbox Folder:

Conversation Index has 2 Timestamps, Hex string is:

0101AA4398B709738B5E1C65C7EFCF071A2825E9C6B0011CD2D1C5

{09738B5E-1C65-C7EF-CF07-1A2825E9C6B0} Date/Time of 10/30/1830 6:47:11 AM Date/Time of 11/4/1830 9:42:34 PM retrieved from Response 0

 

Base 64 decoded Thread-Index header has 2 Timestamps, Hex string is:

01D0479000E57F2A47A540594D9AACC3EF5CDED2AF380000384EB0

{7F2A47A5-4059-4D9A-ACC3-EF5CDED2AF38} Date/Time of 2/13/2015 8:21:40 AM Date/Time of 2/13/2015 8:27:58 AM retrieved from Response 0

 

Second Response Message From Machine 1 Outlook 2013 Sent Items Folder:

Conversation Index has 3 Timestamps, Hex string is:

0101AA4398B709738B5E1C65C7EFCF071A2825E9C6B0011CD2D1C59D31B4CC80

{09738B5E-1C65-C7EF-CF07-1A2825E9C6B0} Date/Time of 10/30/1830 6:47:11 AM Date/Time of 11/4/1830 9:42:34 PM retrieved from Response 0 Date/Time of 11/12/1843 8:38:20 AM retrieved from Response 1

 

Third Response Message Received From Machine 1 Outlook 2013 Inbox Folder:

Conversation Index has 4 Timestamps, Hex string is:

0101AA4398B709738B5E1C65C7EFCF071A2825E9C6B0011CD2D1C500BBD34DC701F2084892

{09738B5E-1C65-C7EF-CF07-1A2825E9C6B0} Date/Time of 10/30/1830 6:47:11 AM Date/Time of 11/4/1830 9:42:34 PM retrieved from Response 0 Date/Time of 11/8/1830 3:20:36 PM retrieved from Response 1 Date/Time of 11/18/1830 1:00:49 PM retrieved from Response 2

 

Base 64 decoded Thread-Index header has 4 Timestamps, Hex string is:

0101AA4398B709738B5E1C65C7EFCF071A2825E9C6B0011CD2D1C59D31B4CC80800000A4E0

{09738B5E-1C65-C7EF-CF07-1A2825E9C6B0} Date/Time of 10/30/1830 6:47:11 AM Date/Time of 11/4/1830 9:42:34 PM retrieved from Response 0 Date/Time of 11/12/1843 8:38:20 AM retrieved from Response 1 Date/Time of 11/12/1843 8:40:37 AM retrieved from Response 2

 

The following conversation with Outlook 2010 originated from Outlook 2013:

 

Sent Message From Machine 1 Outlook 2013 Sent Items Folder:

Conversation Index has 1 Timestamps, Hex string is:

01D047953ADE058A70CDEA7B44CF94F04B1FA2ACB007

{058A70CD-EA7B-44CF-94F0-4B1FA2ACB007} Date/Time of 2/13/2015 8:59:05 AM

 

Received Message From Machine 2 Outlook 2010 Inbox Folder:

Conversation Index has 1 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A31

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM

 

Base 64 decoded Thread-Index header has 1 Timestamps, Hex string is:

01D047953ADE058A70CDEA7B44CF94F04B1FA2ACB007

{058A70CD-EA7B-44CF-94F0-4B1FA2ACB007} Date/Time of 2/13/2015 8:59:05 AM

 

First Response Message From Machine 2 Outlook 2010 Sent Items Folder:

Conversation Index has 2 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A319C51927F70

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 11/12/1843 9:14:55 AM retrieved from Response 0

 

First Response Message Received From Machine 1 Outlook 2013 Inbox Folder:

Conversation Index has 2 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C9

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0

 

Base 64 decoded Thread-Index header has 2 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A319C51927F70

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 11/12/1843 9:14:55 AM retrieved from Response 0

 

Second Response Message From Machine 1 Outlook 2013 Sent Items Folder:

Conversation Index has 3 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C99C3FDA9600

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 11/12/1843 9:19:06 AM retrieved from Response 1

 

Second Response Message Received From Machine 2 Outlook 2010 Inbox folder:

Conversation Index has 3 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C900B8F7A30B

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 4/11/1831 12:59:07 PM retrieved from Response 1

 

Base 64 decoded Thread-Index header has 3 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C99C3FDA9600

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 11/12/1843 9:19:06 AM retrieved from Response 1

 

Third Response Message From Machine 2 Outlook 2010 Sent Items Folder:

Conversation Index has 4 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C900B8F7A30B9C3A140820

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 4/11/1831 12:59:07 PM retrieved from Response 1 Date/Time of 11/12/1843 9:23:20 AM retrieved from Response 2

 

Third Response Message Received From Machine 1 Outlook 2013 Inbox Folder:

Conversation Index has 4 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C900B8F7A30B0242C32426

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 4/11/1831 12:59:07 PM retrieved from Response 1 Date/Time of 4/23/1831 1:10:53 AM retrieved from Response 2

 

Base 64 decoded Thread-Index header has 4 Timestamps, Hex string is:

01021ECD2713B3339C5DAED2A0AC482B72999CB07A3102372279C900B8F7A30B9C3A140820

{B3339C5D-AED2-A0AC-482B-72999CB07A31} Date/Time of 3/27/1831 1:04:06 PM Date/Time of 4/7/1831 8:42:56 PM retrieved from Response 0 Date/Time of 4/11/1831 12:59:07 PM retrieved from Response 1 Date/Time of 11/12/1843 9:23:20 AM retrieved from Response 2

 

Outlook 2013 constructs a valid timestamp in the 22 byte header of the PR_CONVERSATION_INDEX property of the sent message that starts the conversation with Outlook 2010. Upon receiving the message, Outlook 2010 constructs a PR_CONVERSATION_INDEX property value for the received message that changes the GUID and inserts an invalid timestamp in the 22 byte header of the property value. The proper values are present in the Thread-index property of the internet mail headers that accompany the received message but are ignored by Outlook 2010. The reply to Outlook

2013 from Outlook 2010 uses these changed values in the PR_CONVERSATION_INDEX property of the response and Outlook 2010 also appends an invalid delta timestamp for the first response. Outlook 2013 receives the reply and constructs a PR_CONVERSATION_INDEX property whose value includes the changed GUID and invalid timestamp in the 22 byte header. However, Outlook 2013 ignores the delta timestamp created by Outlook 2010 for the first response and appends a different invalid delta timestamp to the PR_CONVERSATION_INDEX property value of the received message. The delta timestamp transmitted by Outlook 2010 that represents the first response was present in the Thread-index internet mail header but was ignored by Outlook 2013 upon receiving the message. The second response sent from Outlook 2013 to Outlook 2010 is constructed based on the PR_CONVERSATION_INDEX property value of the received first response message and Outlook 2013 appends an invalid delta timestamp to reflect the second response.

 

Upon receiving the second response message Outlook 2010 constructs a PR_CONVERSATION_INDEX property whose value includes the changed GUID and invalid timestamp in the 22 byte header and the invalid delta timestamp for the first response that matches the values of the message sent by Outlook 2013.  However, it ignores the delta timestamp created by Outlook 2013 for the second response and appends a different invalid delta timestamp to the property value to reflect the second response. The delta timestamp transmitted by Outlook 2013 that represents the second response was present in the Thread-index internet mail header but was ignored by Outlook 2010 upon receiving the message.

 

The same thing happens when Outlook 2010 sends the third response back to Outlook 2013. The PR_CONVERSATION_INDEX property value that Outlook 2013 constructs for the received message changes the delta timestamp for the received message to a different value from that transmitted by Outlook 2010. The transmitted delta timestamp is present in the Thread-index internet mail header but is ignored.

 

The same behavior is exhibited when the conversation between Outlook 2010 and Outlook2013 starts with Outlook 2010 as the sender.

 

Error message 'The Outlook data file (.pst) failed to load for this session.' when adding PST in Outlook addin

$
0
0

Hi All,

I have an Outlook (2003-2013) addin developed using C# (NOT VSTO).

A new client (using the desktop client for Outlook 365) has got a COMException error message stating 'The Outlook data file (.pst) failed to load for this session.' at the code line where I add the PST store (using Microsoft.Office.Interop.Outlook.NameSpaceClass.AddStoreEx).

I have never come across this error message before and there is barely any mention of this message on any forums. The only question I could find regarding this has been asked mid 2014 and hasn't been answered.

I'm fairly sure this is not related to either DisablePST or PSTDisableGrow registry key settings as I check fore their existance and notify the user separately.

Could anyone help me out on how to resolve this? I do not know where to begin even.

Thanks!!

Cheers!


Filter Outlook current view with VBA, get column names.

$
0
0

Hello,

Is it possible to get all the names for the columns in the current view programatically through VBA. I'm trying to do a filtering on the current Dynamics CRM view and I would need the VBA code to check which columns excist in the view that is currently selected and then do some filtering based on that.

Is this possible, can I get to the names of the columns in the current view with VBA or is this a no can do? Does anyone know of some good guides for achieving this?

Best regards and a big thank you in advance!

Janne

How to get first replied time in outlook with VBA or C#

$
0
0

Currently, we can get last replied time using below code, however with the business change, we want to get the first replied time of mail in outlook, can somebody tell me whether we can get first replied time of each mail in outlook? that would be much appreciate. Thanks a lot.  if someone knows that, could you send it to my personal mailbox?  my mailbox: chenxu7601257@qq.com

RepliedTime = CheckBlankFields("PR_LAST_VERB_EXECUTION_TIME", propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x10820040"));

private string CheckBlankFields(string FieldName, object FieldValue)
        {
            string value = string.Empty;
            if (FieldName != "")
            {
                value = FieldValue.ToString();
            }
            return value;
        }

Manipulating subject in mail using VBA

$
0
0

Hi,

I have the need for a VBA code for Outlook, that will take the subject line, identify a casenumber XXXX123456, and put [] on the casenumber. For example:

Subjectline: Printerproblems XXXX123456

Subjectline: Printerproblems [XXXX123456]

(The casenumber can be anywhere in the subject line.)

 Dim strSubject As String
 strSubject = Item.Subject
 strSubject = Replace(strSubject, "XXXX", "[XXXX")
 Item.Subject = strSubject

But I can not find a way to write the last ]. Maybe I am doing this wrong, or something smarter exist.

Please help.

Best regards,

Mr. T

VBA Outlook 2007 Form Hourglass

$
0
0

I want an hourglass to appear when I am performing an action. DoCmd does not seem to exist for this and

"control.MousePointer = fmMousePointerHourGlass"

is not doing anything. What code should I use to make my mouse pointer into an hourglass?

GetExchangeUser method returns null when in Cache-mode

$
0
0

Hi, when I call addressEntry.GetExchangeUser() it returns null. Then I changed to non-cached mode and then it works fine. When I switch back into cache-mode if fails agin by returning null. If I re-create my Outlook-profile, things works again. I have experienced this behavior before. But I suspect that there must be a bug within Outlook/Exchange. Can anyone explain this?

Best regards Esben Rud Nielsen, Bankdata

Viewing all 6421 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>