A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

x-header insertion issue



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 31st 09, 09:57 AM posted to microsoft.public.outlook.program_addins
Microsoft[_3_]
external usenet poster
 
Posts: 1
Default x-header insertion issue

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 12:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.