Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Attachments vai access

Status
Not open for further replies.

M8KWR

Programmer
Aug 18, 2004
864
GB
Hi there, i hope someone can help.

I have found the code in order to send emails from Outlook via access.

But what i am looking to do is attachment multiple files. because i do not know how many files i would be attaching. So i was thinking, can you code it to say attach all the files from a directory??? This way i can point all files that i create there, and carry the filepath over to the email send code.

I hope this all makes sense. If you anybody feels i'm going about it the incorrect way then please let me know.

As another point, is there a way to automate the From: box also.

many thanks for any help in advance.
 
> can you code it to say attach all the files from a directory
Loop all the files in the directory using the
a] Dir function
b] Scripting FileSystemObject of the Microsoft Scripting Runtime
c] Application.FileSearch method

Keep in mind the restrictions of your mailbox size.

>is there a way to automate the From: box also.
Either the .SendOnBehalfOf property of the MailItem object of the Outlook
Or CDO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top