ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   microsoft email range code. Add to Sent Items folder? (https://www.excelbanter.com/excel-programming/367337-microsoft-email-range-code-add-sent-items-folder.html)

Corey

microsoft email range code. Add to Sent Items folder?
 
I have been using the below code to send a range of cells in the body of an
email, but have realised that after it is sent, i have
no items of it in MSOutlook SENT folder.

Can i add it to this with code or someother way?


Sub Send_Range()

' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:B5").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True

' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
End Sub

Regards

Corey....




All times are GMT +1. The time now is 02:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com