Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / June 2007

Tip: Looking for answers? Try searching our database.

Regarding MailItem.UserProperties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bharathi - 27 Jun 2007 10:38 GMT
Hi,

I am using Outlook 2003. I am developing an Add-in using Visual Studio
2005 (C#).

I have coded a method called "SendMail()" as followed:

public void SendMail()
       {
             MailItem newMI = (MailItem)

((Microsoft.Office.Interop.Outlook.Application)applicationObject).CreateItem(OlItemType.olMailItem);
               newMI.To = ".....@gmail.com";

               newMI.Subject = "Test User Property";

               newMI.UserProperties.Add("myUserProperty",
OlUserPropertyType.olText, true, OlUserPropertyType.olText);
               newMI.UserProperties["myUserProperty"].Value = "My
First User Property";
               newMI.Save();
               newMI.Send();
       }

In the above method, I have created a userproperty called
"myUserProperty" and I am sending the mail to my gmail ID. When I log
into gmail and open this mail, I am unable to see my userProperty.

What modifications do I need to make to the code so that I see
myUserProperty in my gmail?

Regards,
Bharathi
Ken Slovak - [MVP - Outlook] - 27 Jun 2007 14:09 GMT
For an Outlook UserProperty to show up in an item receive it using Outlook.
Gmail has no idea of the Outlook object model. For items sent outside of
Outlook about all you can do is create an x-header for your property and
that requires using CDO 1.21 or Extended MAPI (neither of which is supported
for .NET code) or an Extended MAPI COM wrapper such as Redemption
(www.dimastr.com/redemption).

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi,
>
[quoted text clipped - 29 lines]
> Regards,
> Bharathi
Bharathi Harshavardhan - 28 Jun 2007 09:32 GMT
Thanks a lot for the suggestion. I would go for Outlook
Redemptions :-)

---
Bharathi

On Jun 27, 6:09 pm, "Ken Slovak - [MVP - Outlook]"
<kenslo...@mvps.org> wrote:
> For an Outlook UserProperty to show up in an item receive it using Outlook.
> Gmail has no idea of the Outlook object model. For items sent outside of
[quoted text clipped - 44 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.