![]()
Sub CreateMail() Dim rngSubject As Range Dim rngTo As Range Dim rngBody As Range Dim objOutlook As Object Dim objMail As Object Set objOutlook = CreateObject("Outlook.Application") Set objMail = objOutlook.CreateItem(0) With ActiveSheet Set rngTo = .Range("O16") Set rngSubject = .Range("O17") Set rngBody = .Range(.Range("D15"), .Range("K25").End(xlDown)) End With rngBody.CopyPicture xlScreen, xlBitmap With objMail .to = rngTo .Subject = rngSubject .Display 'Instead of .Display, you can use .Send to send the email _ or .Save to save a copy in the drafts folder .Body = "TextBox3.Text" End With SendKeys "({END})" SendKeys "({ENTER})" SendKeys "({ENTER})" SendKeys "^({v})", True Set objOutlook = Nothing Set objMail = Nothing End Sub
Bookmarks