Images in outlook e-mails.

B

ben

I am trying to create a newsletter type macro that allows us to send
flyers/sales out to a customer list. Creating the e-mails, adding
attachments, adding recipients has been accomplished with no problem. Now I
am having an issue adding pictures to an e-mail.

I am trying to copy the "insert-picture from file" functionality when you
are creating an outlook message. I recorded a macro when doing so and
received the following line

Selection.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _
False, SaveWithDocument:=True

Turns out that I'm using Word as my e-mail editor and that is a Word command
and can't be used with..

Dim oOutlook As Object
Dim oMailItem As Object
Dim oRecipient As Object
Dim oNameSpace As Object
Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True
For u = 1 To 1
Set oMailItem = oOutlook.CreateItem(0)
Set oRecipient = _
oMailItem.Recipients.Add("(e-mail address removed)")
oRecipient.Type = 1 '1 = To, use 2 for cc
'keep repeating these lines with
'your names, adding to the collection.
With oMailItem
..Subject = "Tux - Test"
..Body = bstr
'.InlineShapes.AddPicture Filename:="C:\b&w.jpg", LinkToFile:= _
False, SaveWithDocument:=True
..display
End With

Does anyone know the best way to do this?
 
J

Joel

See Ron Debruin website for sending email. the body of the email needs to be
HTML and you have to save the picture into a HTML file and then import that
picture into the word/email document

www.Rondebruin.com
 

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