Hello everyone, I have very, very limited knowledge of VBA and I generally just find code does something similar to what I need and try to modify it it to work for me. Not for this one though lol .
In this instance I have a button in a report summary, I would like to click the button "Send Email to Team" and have it highlight and copy a range from the report, open a new Outlook email, enter the "To", "subject" and Text in body and then paste the selection as a picture.
I have the code that copies the range, automatically opens a new Outlook email for me and enters the "To" address, Subject and some text into the email body based on text coming from specific cells in a report.
What I still need is how to Paste the range from the report into the email just after the text in the Body. I would like it to take the range and convert it to a picture if possible just so it keeps it formatting and can be easily resized if needed.
I do not want it to send the email, just generate it with the picture so additional info can be added if need prior to Sending the email.
I am using Office 360 Enterprise - Excel version 2308
Here is my current code and a snapshot of my spreadsheet.
Sub Sendemail()
Range("A10:L60").Select
Selection.Copy
Dim OutApp As Object, OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Range("B1").Value
.Subject = Range("B2").Value
.Body = Range("B3").Value
.Display
' .Body = Selection.Paste
' Selection.Paste
End With
End Sub
' Set OutMail = Nothing
Thank you in Advance,
In this instance I have a button in a report summary, I would like to click the button "Send Email to Team" and have it highlight and copy a range from the report, open a new Outlook email, enter the "To", "subject" and Text in body and then paste the selection as a picture.
I have the code that copies the range, automatically opens a new Outlook email for me and enters the "To" address, Subject and some text into the email body based on text coming from specific cells in a report.
What I still need is how to Paste the range from the report into the email just after the text in the Body. I would like it to take the range and convert it to a picture if possible just so it keeps it formatting and can be easily resized if needed.
I do not want it to send the email, just generate it with the picture so additional info can be added if need prior to Sending the email.
I am using Office 360 Enterprise - Excel version 2308
Here is my current code and a snapshot of my spreadsheet.
Sub Sendemail()
Range("A10:L60").Select
Selection.Copy
Dim OutApp As Object, OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Range("B1").Value
.Subject = Range("B2").Value
.Body = Range("B3").Value
.Display
' .Body = Selection.Paste
' Selection.Paste
End With
End Sub
' Set OutMail = Nothing
Thank you in Advance,