none
VSTO Outlook 2010, 2013 - using mailItem BillingInformation,,, RRS feed

  • Question

  • Hi,

    we use Office 2010 and 2013. Now i created (c#) a outlook addin which creats databas entries in our business-software. The Databas ID i want to save in the emailItem. Is it ok to use the BillingInformation for this issue? Or is it better to create a on property?

    If i forward the mail this information shouldn't be lost. The receiver must use this informationen!

    Thanks for helping me!

    best Regards

    Rene

    Thursday, December 12, 2013 5:33 PM

All replies

  •  >>Is it ok to use the BillingInformation for this issue? Or is it better to create a on property?<<

    To more effectively understand you issue, I will confirm some question with you:

    1.What your requirement in the Outlook add-in?

    2.Does the databas means database? What's the meaning of the Databas ID?

    3.How do you want to save the Databas ID in the emailItem?

    Friday, December 13, 2013 12:23 PM
  • Hello Rene,

    It looks like you are interested in using the UserProperties collection. The MailItem class provides the UserProperties property which returns an instance of the UserProperties class. You can use the Add method for adding new properties:

    Outlook.UserProperties userProps = mail.UserProperties;
    Outlook.UserProperty property = userProps.Add("MyPropertyName", Outlook.OlUserPropertyType.olText, true, Outlook.OlFormatText);
    property.Value = "Hello world!";
    If a custom property does not exist in the delivery store, the property will  not be created, and its value will be lost. If the custom property already exists in the delivery store, its value is persisted.
    Friday, December 13, 2013 1:40 PM