open a msg.file from VBA 
Author Message
 open a msg.file from VBA

To automate Outlook from another application you have to use
CreateObject:

Dim oOL As Outlook.Application

Set oOL = CreateObject("Outlook.Application")

--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Co-author of "Programming Microsoft Outlook 2000", Chapters 8-13,
Appendices, Sams


Quote:
> How do I open an outlook item from access-VBA?

> I want to open an msg-file (like an e-mail saved on the
> hard drive), but I dont know which application to
> associate in a shell-command, as it doesn't work with
> MSoutlook.

> I can open a word-doc with Shell("C:\programs\WINWORD.EXE
> test.doc")

> but cant make it work with outlook and msg-files.



Sun, 07 Dec 2003 23:59:55 GMT  
 open a msg.file from VBA
To add to Ken's response, once you have the Application object, you can open a *copy* of a .msg file by using Outlook's Application.CreateItemFromTemplate method.

--

Sue Mosher, Outlook MVP
Author of
     Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours
     Microsoft Outlook 2000 E-mail and Fax Guide
Outlook and Exchange solutions at http://www.slipstick.com

Quote:

> How do I open an outlook item from access-VBA?

> I want to open an msg-file (like an e-mail saved on the
> hard drive), but I dont know which application to
> associate in a shell-command, as it doesn't work with
> MSoutlook.

> I can open a word-doc with Shell("C:\programs\WINWORD.EXE
> test.doc")

> but cant make it work with outlook and msg-files.



Mon, 08 Dec 2003 00:45:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How do I open a msg file programatically in vba as a SENT file

2. How do I open a msg file programatically in vba as a SENT file

3. Open *.msg-file from VBA

4. open a message file *.msg in outlook 2000 using vba

5. Opening msg files in VBA.

6. Xfering .msg files from file system to MAPI folder using VBA

7. Opening a File Open window for file selection in VBA

8. VBA: Open mail, let user paste msg and then send blindcopy

9. VBA coding for msg box, close form, open table

10. VBA - Get .msg File Name from Message!!


 
Powered by phpBB® Forum Software © phpBB Group