Attach image in body from resource RRS feed

  • Question

  • I am currently developing an Outlook add in that automatically creates a signature in the body of a new email.

    Currently it adds our company logo from a network share via HTML.

    bodyTest.AppendLine(@"<tr><td ><img src='\\netshare\branding\logo.jpg'/></td></tr></table>");

    But if the user is on a laptop working from home then the network share doesnt exist. How can I insert an image from an application resource?

    Tuesday, January 3, 2012 9:28 AM


  • You can extract the image to a file, then specify its path in the HTML.

    Or, better yet, refer to the image through the cid img attribute and add the image as an attachment and set its PR_ATTACH_CONTENT_ID property appropriately.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 3, 2012 2:50 PM

All replies