LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default insert picture in email message


I use the following code to create an email from my VBA-project within
Excel.
All lines work fine except:

objMail.InlineShapes.AddPicture Filename:= _
"E:\DisLogo.bmp", LinkToFile:=False, _
SaveWithDocument:=True

Does anyone know how to write this line ?


Dim objMail As Object
Dim objOL As Object

On Error Resume Next
Set objOL = GetObject(, "Outlook.Application")
On Error GoTo 0
If objOL Is Nothing Then
Set objOL = CreateObject("Outlook.Application")
End If
Set objMail = objOL.CreateItem(0)
objMail.To = "
objMail.Body = "myText"
objMail.Subject = "mySubject"
objMail.InlineShapes.AddPicture Filename:= _
"E:\DisLogo.bmp", LinkToFile:=False, _
SaveWithDocument:=True
objMail.Display

thanks in advance
hugo


--
H.A. de Wilde
------------------------------------------------------------------------
H.A. de Wilde's Profile: http://www.excelforum.com/member.php...o&userid=30679
View this thread: http://www.excelforum.com/showthread...hreadid=566939

 
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
insert email message in excel sachin Excel Discussion (Misc queries) 2 August 15th 08 10:18 AM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Can I insert cell values into an email message this way? Nicole Seibert Excel Programming 1 July 7th 06 08:14 PM
Extract Email from a Picture [email protected] Excel Programming 1 April 9th 06 07:48 AM


All times are GMT +1. The time now is 07:42 PM.

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

About Us

"It's about Microsoft Excel"