D
Dan Gardner
I’ve created an outlook email in a macro using the following code;
'Control Microsoft Outlook and create a new Email
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.To = Worksheets("Sheet1").Cells(2, 17).Value
'Assign a Subject to the Email
myItem.Subject = Worksheets("Sheet1").Cells(1, 1).Value
'Attach File to Mesage
myItem.body = ???????
'Send the Email
myItem.Send
As you can see I can't seam to figure out the Attach file command. Any help
would be greatly appreciated.
Thanks,
Dan
'Control Microsoft Outlook and create a new Email
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.To = Worksheets("Sheet1").Cells(2, 17).Value
'Assign a Subject to the Email
myItem.Subject = Worksheets("Sheet1").Cells(1, 1).Value
'Attach File to Mesage
myItem.body = ???????
'Send the Email
myItem.Send
As you can see I can't seam to figure out the Attach file command. Any help
would be greatly appreciated.
Thanks,
Dan