Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default How Do I attach a atachment to a VBA created email?

Ive 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How Do I attach a atachment to a VBA created email?

Hi Dan,

Visit Ron de Bruin's web site at:

http://www.rondebruin.nl/sendmail.htm


---
Regards,
Norman



"Dan Gardner" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to attach doc.to an email? Pam B. New Users to Excel 1 February 15th 10 05:08 AM
Attach Email to a Cell Dave Excel Discussion (Misc queries) 5 December 17th 09 05:59 PM
attach outlook email rwtrader Excel Discussion (Misc queries) 1 April 6th 09 10:49 PM
how do I attach spreadsheet in email fotomaxi Excel Worksheet Functions 2 March 3rd 09 02:53 AM
attach to email Eric[_11_] Excel Programming 2 August 26th 03 07:56 PM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"