Opening & Sending a previously saved mail item

W

WhytheQ

Here's a tricky one!

I've got an e-mail that is set up and saved in a network folder e.g
J:\Finance\MYMAIL.??? (as you can see I'm not even sure what the file
stem is for an outlook mailitem!)
I don't know how to get a hold of htis object....usually in code I find
myself creating a new mail item, that is using the following code:

Set MyOutMail = OutApp.CreateItem(0)

....but if the mail already exists I'm not too sure how to reference it.
Once I've got hold of the object I intend on changing some of the
properties and then sending it which should be easy enough.

Any help greatly appreciated,
Regards,
Jason.
 
S

Sue Mosher [MVP-Outlook]

If it's an .oft or .msg file (and why don't you know???), you can use the Application.CreateItemFromTemplate command to create a new unsent item that's a copy of the saved file.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
W

WhytheQ

sue,

thanks for quick response: I'll try it out
out of interest: what is a quick way of finding out a file extension
(I'm pretty sure it's an msg file)

thanks
Jason
 
S

Sue Mosher [MVP-Outlook]

Look in the folder? Look at the item properties? Turn on file extensions in Windows Explorer? Pick one or more.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
W

WhytheQ

Thanks Sue
Just got round to using the createfromitemtemplate - whatan excellent
little method it is!
Adjusted the properties in my explorer aswell (- thanks)

Regards
Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top