![]() |
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 |
insert picture in email message
Hugo,
this might help: http://www.enhanceddatasystems.com/E...lSendChart.htm -- Robin Hammond www.enhanceddatasystems.com "H.A. de Wilde" wrote in message news:H.A.de.Wilde.2bup91_1154418304.1878@excelforu m-nospam.com... 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 |
All times are GMT +1. The time now is 12:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com