![]() |
#1
|
|||
|
|||
![]() Hello, Does anyone know some simple VBL code so that the macro i am using to generate a standard email will automatically attach a file to the email. Any advice would be much appreciated. |
#2
|
|||
|
|||
![]()
Try this http://msdn.microsoft.com/en-us/libr.../ff869553.aspx
Code:
Sub AddAttachment() Dim myItem As Outlook.MailItem Dim myAttachments As Outlook.Attachments Set myItem = Application.CreateItem(olMailItem) Set myAttachments = myItem.Attachments myAttachments.Add "C:\Test.doc", olByValue, 1, "Test" myItem.Display End Sub ******************* Consider rating the thread by going to the "Rate Thread" dropdown. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Claytocb | Mail Merge | 5 | 09-12-2012 06:02 PM |
![]() |
chefmate | Excel Programming | 1 | 08-26-2012 01:04 AM |
Email with Excel attachment | Renee | Outlook | 0 | 02-01-2012 12:07 PM |
Automatic reply with variable attachment | subby80 | Outlook | 0 | 10-20-2011 06:59 AM |
![]() |
Nexus | Mail Merge | 12 | 04-13-2011 11:34 PM |