![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi Ken,
I tried to implement the following code in the ThisAddIn_Startup method on application startup. The code seems to be working fine and no exception is thrown on the run time. However, when I go back into the inbox and right click on option, I couldn't find the 'x-testheader' in the header section. I have tried out all the possible solutions that I can think of but still no luck to make it work. Can you please give me some direction on what may went wrong with the following code? thanks in advance. foreach (Outlook.MAPIFolder folder in this.Application.Session.Folders) { Outlook.MAPIFolder inbox = folder.Folders["Inbox"]; foreach (object o in inbox.Items) { Outlook.MailItem mailItem = o as Outlook.MailItem; if (mailItem != null) { // Adding x-header string xHeaderTag = "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/x-testheader"; mailItem.PropertyAccessor.SetProperty(xHeaderTag, mailItem.EntryID.ToString()); // set entry id value mailItem.Save(); } } } Cheers, Kyle |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ActiveX warning on signature insertion | Thorbjorn Sundboe | Outlook - General Queries | 0 | March 11th 08 10:38 PM |
Automatic Insertion of EMail Signatures | Hldrtght | Outlook - General Queries | 3 | December 15th 06 05:47 PM |
Automatic area code insertion in Outlook. | V | Outlook - Using Contacts | 6 | December 5th 06 08:57 PM |
Insertion | Bernadette Louise | Outlook Express | 0 | October 18th 06 08:09 PM |
Unexpected Text Insertion | [email protected] | Outlook - General Queries | 3 | February 5th 06 01:13 AM |