This is only my 3rd VBA that I am working on and struggling to get something where I can:
- take a screenshot of 'part' of an excel worksheet
- paste it in the 'body' of an email
I have tried much googling but no luck. I found this but not quite able to make it work/understand it.
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Here is what I have written so far. Sorry if its so messy ... like I said, its only my 3rd one.
Sub Reconcile2()
Dim OutApp As Object
Dim OutMail As Object
Dim Range As Range
Dim sMsgBody As String
sMsgBody = "This Order is for: " & vbCr & vbCr
sMsgBody = sMsgBody & "Name: " & Worksheets("sheet1").Range("c3") & vbCr
sMsgBody = sMsgBody & "Account # DEBITED: " & Worksheets("sheet1").Range("d38") & vbCr
sMsgBody = sMsgBody & "Amount Debited: $" & Worksheets("sheet1").Range("j38") & vbCr
sMsgBody = sMsgBody & "Additional Details for Completion: " & Worksheets("sheet1").Range("D26")
'sMsgBody = sMsgBody & "The vbcr means skip a line, and if " & vbCr
'sMsgBody = sMsgBody & " you place to of them you will skip 2 lines." & vbCr & vbCr
'sMsgBody = sMsgBody & "Thank you," & vbCr & vbCr
'sMsgBody = sMsgBody & "John"
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "me@home.com"
'.To = sTo
'.CC = "you@home.com"
.BCC = ""
.Subject = "Order for " & Worksheets("sheet1").Range("I6") & " Branch Created"
.body = sMsgBody
.display
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
End With
End Sub
Any specific details/explanation would be appreciated. Thanks in 'advance' for your help.
Kathleen
Bookmarks