|
|
|||
| Basic Outlook Printer Friendly Version | |||
|
|
Working with Outlook items, folders, recipients; dealing with security; writing event handlers | ||
| Topic | |||
|
|
copy data from Excel into email body
I hope someone can help. What I'm task with is fairly straight forward but I'm afraid is way over my coding skills. Here's what I'm trying to do. I have the following macro that creates a new message and inserts an excel attachment. However there is data in the attachment that I would like to paste in the actual email body. There is only one worksheet with data in the spreadsheet. Here is the code I have so far: Sub cmdSendmsg_Click() Dim objOutlook Dim objMail Dim strMsg 'Create a new message Set objOutlook = CreateObject("Outlook.Application") Set objMail = objOutlook.CreateItem(olMailItem) objMail.SentOnBehalfOfName = "email from address" objMail.To = "email to address" objMail.Attachments.Add "C:\Test\Test.xlsx" objMail.CC = "email cc address" objMail.Subject = "this subject" objMail.Save Set objMail = Nothing Set objOutlook = Nothing End Sub so in that attachment I am adding, can I open it, copy the data, paste in body then close it? myquestion 13-Nov-2012 21:24 |
||
|
|
Lyza Hundley
09-Dec-2012 21:13
Learned so much from this one. |
||
|
|
|||
| Post a new message to this topic. |
