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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Insert an image in a new email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 14th 07, 09:37 AM posted to microsoft.public.outlook.program_vba
Wolfgang Kais[_2_]
external usenet poster
 
Posts: 3
Default Insert an image in a new email

Dear newsgroup.

I am trying to insert a picture into a new email using vba code in Outlook
2003. The attachments.add method seems to add an attachment (or an icon),
but what I want is to automate the functionality of the menu command "Insert
Picture" that will display the picture inline. How can this be done using
VBA?

Thanks in advance,
Wolfgang


  #2  
Old November 14th 07, 02:25 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Insert an image in a new email

You can find the ID of that button in the menus and call its Execute method,
that will open that dialog but not automate it further. Other than that
you'd have to create your own replica dialog.

You can automate inserting an attachment as an embedded object if you want,
or attach it using code in any of the other supported ways but that's about
it.

--
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


"Wolfgang Kais" wrote in message
...
Dear newsgroup.

I am trying to insert a picture into a new email using vba code in Outlook
2003. The attachments.add method seems to add an attachment (or an icon),
but what I want is to automate the functionality of the menu command
"Insert Picture" that will display the picture inline. How can this be
done using VBA?

Thanks in advance,
Wolfgang


  #3  
Old November 15th 07, 10:16 AM posted to microsoft.public.outlook.program_vba
Wolfgang Kais[_2_]
external usenet poster
 
Posts: 3
Default Insert an image in a new email

Thank you, Ken.

I'd like to know what you mean by "my own replica dialog".
I have no problem in creating a dialog form, neither in Word nor in
Outlook, the problem is the code to create the inline picture knowing the
path to the file.

--
Regards,
Wolfgang


"Ken Slovak - [MVP - Outlook]" wrote:
You can find the ID of that button in the menus and call its Execute
method, that will open that dialog but not automate it further. Other than
that you'd have to create your own replica dialog.

You can automate inserting an attachment as an embedded object if you
want, or attach it using code in any of the other supported ways but
that's about it.

--
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


"Wolfgang Kais" wrote in message
...
Dear newsgroup.

I am trying to insert a picture into a new email using vba code in
Outlook 2003. The attachments.add method seems to add an attachment (or
an icon), but what I want is to automate the functionality of the menu
command "Insert Picture" that will display the picture inline. How can
this be done using VBA?

Thanks in advance,
Wolfgang




  #4  
Old November 15th 07, 02:44 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Insert an image in a new email

What I meant was to design and use your own form instead of the Outlook
form. That's the only way you'd have control over the dialog and would know
for example what image was selected.

--
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


"Wolfgang Kais" wrote in message
...
Thank you, Ken.

I'd like to know what you mean by "my own replica dialog".
I have no problem in creating a dialog form, neither in Word nor in
Outlook, the problem is the code to create the inline picture knowing the
path to the file.

--
Regards,
Wolfgang


  #5  
Old November 14th 07, 05:04 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Insert an image in a new email

Just to add to what Ken says, if Word is the email editor, you have an additional option: Return a Word.Document object using the Inspector.WordEditor method, then use Word methods to insert a picture. In this instance, the Word macro recorder can be your friend.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Wolfgang Kais" wrote in message ...
Dear newsgroup.

I am trying to insert a picture into a new email using vba code in Outlook
2003. The attachments.add method seems to add an attachment (or an icon),
but what I want is to automate the functionality of the menu command "Insert
Picture" that will display the picture inline. How can this be done using
VBA?

Thanks in advance,
Wolfgang


  #6  
Old November 15th 07, 10:22 AM posted to microsoft.public.outlook.program_vba
Wolfgang Kais[_2_]
external usenet poster
 
Posts: 3
Default Insert an image in a new email

Thanks to both of you.

I agree that it was all simple if the users selected Word as their email
editor, but I can't predict that.
I found the following: http://www.outlookcode.com/d/code/htmlimg.htm
That seems a little complicated, but maybe I'll give it a try.

Thanks again!
--
Regards,
Wolfgang

"Sue Mosher [MVP-Outlook]" wrote in "quoted printable":
Just to add to what Ken says, if Word is the email editor, you have an
additional option: Return a Word.Document object using the
Inspector.WordEditor method, then use Word methods to insert a picture. In
this instance, the Word macro recorder can be your friend.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Wolfgang Kais" wrote in message
...
Dear newsgroup.

I am trying to insert a picture into a new email using vba code in Outlook
2003. The attachments.add method seems to add an attachment (or an icon),
but what I want is to automate the functionality of the menu command
"Insert
Picture" that will display the picture inline. How can this be done using
VBA?

Thanks in advance,
Wolfgang




 




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 an image Grijze Duif Outlook Express 3 September 22nd 07 11:38 AM
Outlook 2007 - Signature to Insert Business Card without image Cay Outlook - Using Forms 1 May 25th 07 01:30 AM
insert as text (to insert html into email body) Iona Outlook - General Queries 1 July 13th 06 12:10 PM
gif image in email body The Gordons Outlook Express 7 May 31st 06 01:00 PM
OE Image insert blocked. Johnno Outlook Express 8 March 19th 06 06:50 PM


All times are GMT +1. The time now is 10:36 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.