none
Adding x header under attachments RRS feed

  • Question

  • I know that you can use Msg.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/X-Test-Header", "test header value" to set a header in the main section of the header.  I need to create a custom x header under each attachment containing information for that attachment.  How could I do this?
    Thursday, April 12, 2012 10:24 PM

Answers

  • each attachment in MailItem.Attachments collection also has PropertyAccessor.
    • Marked as answer by ychro Friday, April 13, 2012 3:07 PM
    Friday, April 13, 2012 9:11 AM

All replies

  • each attachment in MailItem.Attachments collection also has PropertyAccessor.
    • Marked as answer by ychro Friday, April 13, 2012 3:07 PM
    Friday, April 13, 2012 9:11 AM
  • I had tried this with no success.  After your reply I rechecked and I overlooked adding the index of which attachment i was accessing.  the code should have been MailItem.Atachments[x].PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/X-Test-Header", "test header value");

    Thanks for you help!

    Friday, April 13, 2012 2:05 PM
  • so it works for you? If so, mark the answer and close thread :-)
    Friday, April 13, 2012 2:18 PM