A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Insert PNG picture programatically on outgoing email (OL2007)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 2nd 08, 11:23 PM posted to microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Mark B[_2_]
external usenet poster
 
Posts: 93
Default Insert PNG picture programatically on outgoing email (OL2007)

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

(VSTO C# Outlook Add-in)

Ads
  #2  
Old November 3rd 08, 12:47 PM posted to microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Alan Moseley
external usenet poster
 
Posts: 61
Default Insert PNG picture programatically on outgoing email (OL2007)

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)


  #3  
Old November 3rd 08, 02:01 PM posted to microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Insert PNG picture programatically on outgoing email (OL2007)

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" wrote in message
...
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)



  #4  
Old November 4th 08, 03:39 AM posted to microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Mark B[_2_]
external usenet poster
 
Posts: 93
Default Insert PNG picture programatically on outgoing email (OL2007)

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]" wrote in message
...
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" wrote in message
...
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)




  #5  
Old November 4th 08, 02:27 PM posted to microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Insert PNG picture programatically on outgoing email (OL2007)

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" wrote in message
...
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."


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert PNG picture programatically on outgoing email (OL2007) Mark B[_2_] Outlook and VBA 4 November 4th 08 02:27 PM
Cannot Insert picture as attachment only in body of email sylvia Outlook - General Queries 1 July 14th 08 10:04 AM
Can't insert picture into HTML email in OE6 OE User Outlook Express 1 August 22nd 06 12:02 PM
Can't insert picture into email cavuu Outlook - General Queries 1 February 19th 06 11:30 PM
Can't insert picture into email cavuu Outlook - General Queries 0 February 16th 06 01:48 AM


All times are GMT +1. The time now is 09:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.