Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Insert PNG picture programatically on outgoing email (OL2007)

Geek News

Insert PNG picture programatically on outgoing email (OL2007)
"Mark B" <none123[ at ]none.com> 11/2/2008 11:23:43 PM
How can I insert a png programmatically on an outgoing email (OL2007) (at
the bottom, embedded, not linked)?

(VSTO C# Outlook Add-in)

RE: Insert PNG picture programatically on outgoing email (OL2007)
Alan Moseley 11/3/2008 12:47:01 PM
Have a look at the following website, it should help.

http://www.outlookcode.com/d/code/htmlimg.htm
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Mark B" wrote:

[Quoted Text]
> How can I insert a png programmatically on an outgoing email (OL2007) (at
> the bottom, embedded, not linked)?
>
> (VSTO C# Outlook Add-in)
>
>
Re: Insert PNG picture programatically on outgoing email (OL2007)
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 11/3/2008 2:01:54 PM
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Alan Moseley" <AlanMoseley[ at ]discussions.microsoft.com> wrote in message
news:2C69051D-325A-4696-9990-7CA0A4E00F33[ at ]microsoft.com...
[Quoted Text]
> Have a look at the following website, it should help.
>
> http://www.outlookcode.com/d/code/htmlimg.htm
> --
> Alan Moseley IT Consultancy
> http://www.amitc.co.uk
>
> If I have solved your problem, please click Yes below. Thanks.
>
>
> "Mark B" wrote:
>
>> How can I insert a png programmatically on an outgoing email (OL2007) (at
>> the bottom, embedded, not linked)?
>>
>> (VSTO C# Outlook Add-in)
>>
>>

Re: Insert PNG picture programatically on outgoing email (OL2007)
"Mark B" <none123[ at ]none.com> 11/4/2008 3:39:33 AM
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."



"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message
news:Om35m0bPJHA.1164[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Alan Moseley" <AlanMoseley[ at ]discussions.microsoft.com> wrote in message
> news:2C69051D-325A-4696-9990-7CA0A4E00F33[ at ]microsoft.com...
>> Have a look at the following website, it should help.
>>
>> http://www.outlookcode.com/d/code/htmlimg.htm
>> --
>> Alan Moseley IT Consultancy
>> http://www.amitc.co.uk
>>
>> If I have solved your problem, please click Yes below. Thanks.
>>
>>
>> "Mark B" wrote:
>>
>>> How can I insert a png programmatically on an outgoing email (OL2007)
>>> (at
>>> the bottom, embedded, not linked)?
>>>
>>> (VSTO C# Outlook Add-in)
>>>
>>>
>

Re: Insert PNG picture programatically on outgoing email (OL2007)
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 11/4/2008 2:27:24 PM
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" <none123[ at ]none.com> wrote in message
news:ODKU97iPJHA.1164[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> 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."

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net