Insert PNG picture programatically on outgoing email (OL2007)

M

Mark B

How can I insert a png programmatically on an outgoing email (OL2007) (at
the bottom, embedded, not linked)?

(VSTO C# Outlook Add-in)
 
K

Ken Slovak - [MVP - Outlook]

But don't try to use the CDO 1.21 code example at that link use of CDO is
not supported for managed code. In Outlook 2007 the new PropertyAccessor
object can be used to work with the MAPI properties referenced in the CDO
code sample, with a translation of the CDO property tag attributes to what's
required for PropertyAccessor.
 
M

Mark B

Thanks very much to the both of you. One final point which you may or may
not be able to confirm:

I relayed this thread to my programmer colleague. He said:

"That's all good but it seems like (after extensive search on net) only a
file-path can be parsed to "source" parameter of Attachments.Add method. So
an image object cannot be embedded in Outlook.MailItem directly. I guess
what we can do is save the footer-image to temporary storage and then attach
that.

It would have been great if we could directly attach an image from an Image
object or MemoryStream."
 
K

Ken Slovak - [MVP - Outlook]

Any attachment can only be added or embedded from a file. I usually save to
a temp folder and then add that file, then I delete the temp file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top