LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 67
Default Images in outlook e-mails.

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 = _
")
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?



--
When you lose your mind, you free your life.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve Outlook mails from Excel Kiran Excel Programming 4 May 19th 09 04:03 PM
signal for incoming mails in outlook express oercim Excel Programming 1 March 30th 06 01:59 PM
Import of Outlook Mails to Excel Sheet Ajay Setting up and Configuration of Excel 6 July 24th 05 11:39 PM
sending mails using outlook Bart van den Burg Excel Programming 1 November 11th 04 12:51 PM
retreiving number of e-mails from public folder in Outlook Barmaley Excel Programming 1 July 15th 03 09:47 PM


All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"