View Single Post
  #3  
Old April 21st 09, 10:09 PM posted to microsoft.public.outlook.program_forms
Michael Schmitz
external usenet poster
 
Posts: 11
Default What is the recommendet way to read/write a user defined Field (Named Property) in the MailItem Object using VSTO?


"Sue Mosher [MVP]" schrieb im Newsbeitrag
...
You should be able to use ItemProperties.Item("UID") or
UserProperties.Item("UID").


Thanks Sue that was the right hint to point me to a direction.
My code looks now like this, I guess the above only works for
VB.NET?

Regards

Michael (I got your Book allready )!

codesnipet:
###########################################

mail = (Outlook.MailItem)this.OutlookItem;
this._txt1.Text = "Read:" + mail.Subject;
try
{
this._txt2.Text = mail.ItemProperties["UID"].Value.ToString();
}
catch
{
this._txt2.Text = "???";
}



Ads