Welcome to Lockergnome.com!
HomeHome FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Regarding MailItem.UserProperties

 
   Home -> Office -> Interoperability RSS
Next:  Interoperability: Getting tasks from Access database  
Author Message
Bharathi

External


Since: Jun 18, 2007
Posts: 3



(Msg. 1) Posted: Wed Jun 27, 2007 2:38 am
Post subject: Regarding MailItem.UserProperties
Archived from groups: microsoft>public>outlook>interop (more info?)

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
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 3213



(Msg. 2) Posted: Wed Jun 27, 2007 9:09 am
Post subject: Re: Regarding MailItem.UserProperties [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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).

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


"Bharathi" <bharathi8179.TakeThisOut@gmail.com> wrote in message
news:1182937112.637880.99390@x35g2000prf.googlegroups.com...
> 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
>
Back to top
Login to vote
Bharathi Harshavardhan

External


Since: Jun 28, 2007
Posts: 2



(Msg. 3) Posted: Thu Jun 28, 2007 1:32 am
Post subject: Re: Regarding MailItem.UserProperties [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks a lot for the suggestion. I would go for Outlook
Redemptions Smile

---
Bharathi


On Jun 27, 6:09 pm, "Ken Slovak - [MVP - Outlook]"
<kenslo... RemoveThis @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
> 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).
>
> --
> Ken Slovak
> [MVP - Outlook]http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
>
> "Bharathi" <bharathi8... RemoveThis @gmail.com> wrote in message
>
> news:1182937112.637880.99390@x35g2000prf.googlegroups.com...
>
>
>
> > 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).CreateIte­m(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- Hide quoted text -
>
> - Show quoted text -
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Interoperability All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 General
 Microsoft Windows XP
 Microsoft Windows Vista
 Microsoft Windows (other)
  Microsoft Office
 Microsoft Office (other)
 Computer Security
 Linux
 Movies


[ Contact us | Terms of Service/Privacy Policy ]