H
H.A. de Wilde
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 = "(e-mail address removed)"
objMail.Body = "myText"
objMail.Subject = "mySubject"
objMail.InlineShapes.AddPicture Filename:= _
"E:\DisLogo.bmp", LinkToFile:=False, _
SaveWithDocument:=True
objMail.Display
thanks in advance
hugo
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 = "(e-mail address removed)"
objMail.Body = "myText"
objMail.Subject = "mySubject"
objMail.InlineShapes.AddPicture Filename:= _
"E:\DisLogo.bmp", LinkToFile:=False, _
SaveWithDocument:=True
objMail.Display
thanks in advance
hugo