Hello everyone,
I have a macro-code that attaches a picture in the e-mail body from the excel Activesheet. My problems are:
I have a macro-code that attaches a picture in the e-mail body from the excel Activesheet. My problems are:
- Is there a possibility to place the image above "Thank you" line ?
- If I want to insert a second picture how can I modify the code so that the Picture2 will be placed bellow Picture1 (currently it's placing in the right of Picture1)
VBA Code:
Sub create_email_2()
Dim oApp As Outlook.Application
Dim email As Outlook.MailItem
Dim inspect As Outlook.Inspector
Dim content As Object
Set oApp = New Outlook.Application
Set email = oApp.CreateItem(olMailItem)
With email
.To = "magic@gmail.com"
.Subject = "E-mail2"
.htmbody = "Hello" & "</p>" _
& "Please see bellow current status" & "</p>" _
& "Thank you" & "</body></html>"
.Display
Set inspect = email.GetInspector
Set content = inspect.WordEditor
ActiveSheet.Pictures(1).Copy
content.Application.Selection.Start = Len(.Body)
content.Application.Selection.Paste
'ActiveSheet.Pictures(2).Copy
'content.Application.Selection.Start = Len(.Body)
'content.Application.Selection.Paste
.Save
'.Send
End With
End Sub