Opening a template and attaching a file

Posted on 2004-08-15
Last Modified: 2010-04-08
I am writing a script using VBScript and automation.  I have created an Outlook 2000 email message template.  My script does some work and creates a file.  I would like my script to then open the Outlook template and attach the file to it.  I will then enter the email address and fire it off.  Any suggestions on how to open the template and attach a file to it?
Question by:jlalande
  • 3
  • 3
LVL 23

Expert Comment

ID: 11804548
What script do you have so far?  Maybe we can make suggestions for improvement.

If this is a homework question, we have already been there and did our own work.

Author Comment

ID: 11804609
Howework?  Heh, that's funny.  I finished school six years ago.
The script in question has been has been used for a very long time.  I am just trying to automate the process the rest of the way.  When I get it running correctly, I am going to use it as a guide to do the whole thing in c# with a nice GUI.
LVL 23

Accepted Solution

slink9 earned 500 total points
ID: 11804653
Okay.  Just checking.

Have you looked at the OL2k object model? - 

That is a tremendous help in OL scripting and VBA programming.
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.


Author Comment

ID: 11805351
Your diagram is very busy but it did get me started on the right path...
The ultimate goal being a C# implementation, I was able to find the answers I needed at these two sites:

Now I would like to create an email account in Outlook on the fly, thereby generalizing the solution and getting rid of the template altogether.  But I don't see an Account collection in the diagram nor can I find anything on the net on how to send email using anything but the default account.  Do you know how to send email using settings other than the ones in the default account?
LVL 23

Expert Comment

ID: 11806079
I don't believe you will be able to do that.  I have code for sending email from VFP using Outlook and MAPIMail but they use the default account.

Author Comment

ID: 11807171
Ok, well thanks for that....I won't waste my time trying to find that solution.

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
exchange, outlook 2 36
Big Problem with Redirected Folder 8 39
Outlook 2013 sent view customization 2 18
Outlook sent emails not present in sent items 2 21
What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now