Creating an email with attachments through VBA

I need my users to be able to create and email that may contain several attachments, will use their own autosignature at the bottom (without being reformatted) and if possible be able to add a default line of additional text into the emails body.

All of the users have Access 2003 and Outlook 2003 upwards.

Thank you.
Andy BrownDeveloperAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Certainly ... but the code supplied should work with any Operating System, assuming the user has sufficient permissions to read the directories where the sig files live (and they should, since those sig files belong to that user).

As to RTF-HTML - RTF is an incredibly complex monster, but if all you're doing is adding the Sig file, that would be formatted in RTF already, so you should be fine with it. HTML is a lot easier to work with and handle.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
The AutoSig in a function of Outlook ... AFAIK, the only way to include that through a 3rd party item (like Access) is to actually include it when you build the email. See this link for how to do this:

http://social.msdn.microsoft.com/forums/en-US/isvvba/thread/9cfedfdf-b7a8-442d-96b8-a5cf5a149673

You can automate Outlook and build an email with as many attachments as you need:

http://support.microsoft.com/kb/161088

Note this uses Early Binding, which requires you to have a reference to the Outlook Library. If you'd prefer to use Late Binding, which does NOT require a reference and instead uses whatever version is installed on the machine:

http://support.microsoft.com/kb/201096
0
 
Andy BrownDeveloperAuthor Commented:
Close, but I was hoping to find a solution that wouldn't care if it was XP/Vista or RTF/HTML.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I'm not sure what you mean ... the code I suggested would work on any machine, regardless of the OS, so long as Outlook was installed.

As to HTML vs RTF - I'm not sure what you're referring to. The code I suggest is an example, and you would of course have to customize it to your needs.
0
 
Andy BrownDeveloperAuthor Commented:
Fair enough - and yes I am slowly getting it to work.  The problem that I've got is that it will be run from different environments.  Some with vista, some with XP, some using RTF and some using HTML emails - so i was really just trying to get a catch all solution.
0
 
Andy BrownDeveloperAuthor Commented:
Spot on.  Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.