Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2013, 04:23 AM
DrLoveday1 DrLoveday1 is offline VBL code for automatic attachment of file into email Windows XP VBL code for automatic attachment of file into email Office 2007
Novice
VBL code for automatic attachment of file into email
 
Join Date: Apr 2013
Posts: 2
DrLoveday1 is on a distinguished road
Default VBL code for automatic attachment of file into email

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.
Reply With Quote
  #2  
Old 04-12-2013, 05:36 AM
niton niton is offline VBL code for automatic attachment of file into email Windows 7 64bit VBL code for automatic attachment of file into email Office 2010 64bit
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBL code for automatic attachment of file into email How to add attachment to email merge Claytocb Mail Merge 5 09-12-2012 06:02 PM
VBL code for automatic attachment of file into email I need help with macro...code needed for automatic sorting 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
VBL code for automatic attachment of file into email email as pdf attachment - subject line and attachment named after mail merge Nexus Mail Merge 12 04-13-2011 11:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft