Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / December 2003

Tip: Looking for answers? Try searching our database.

How to Insert Image into email with a Macro ??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan E. \(NZ\) - 23 Dec 2003 08:08 GMT
Hi there,
I know very little about macro writing -- which is not very helpful because
I am sitting here wanting to get a macro to do something for me!!
In word I just record them and that works great. But in outlook, as you
know, there is no record option. Ouch...

I think this macro is only a few lines long... so I thought maybe someone
skilled with VBA might be happy to simply tell me what to do or point me to
a website that will show me.

Here is what I want to do..
To set up a macro that will insert an image into an email (one that is being
written) at the point where the cursor is at the time it is activated.
The image source will be hard coded into the macro.
If possible I would like the image alignment to be absmiddle.
I will then duplicate the macro for each image.
I have about 10 images (at a guess) that I want to put into a new drop down
menu... so that when I click on the menu item it will call up the macro and
insert the image into the email.
I know how to set up a macro into new menus etc... just no idea how to write
the macro itself.
Basically I am using this to insert various icons (smilies etc) into a
message without having to go INSERT - PICTURE - Choose the picture - set the
Alignment etc.

Well... if someone you know how to achieve this or can point me to a website
that will teach me how to achieve this I would be very grateful.

With my regards,

Jonathan
New Zealand
Sue Mosher [MVP] - 27 Dec 2003 00:01 GMT
This would be possible only if Word is the email editor, since the Outlook
editor provides no information about the insertion point. I just recorded a
macro in Word that showed what method to use:

Selection.InlineShapes.AddPicture FileName:= _
       "C:\Documents and Settings\me.LAN\My Documents\My
Pictures\Dumka2.jpg" _
       , LinkToFile:=False, SaveWithDocument:=True

You should be able to do the same thing with Word's macro recorder and take
it from there.
Signature

Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi there,
> I know very little about macro writing -- which is not very helpful because
[quoted text clipped - 28 lines]
> Jonathan
> New Zealand
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.