Retreiving an Outlook msg from a file in VB 
Author Message
 Retreiving an Outlook msg from a file in VB

I have an application that traps the Item Add event on the Sent Items
folder.  My application saves the Item (MailItem) to disk as a .msg file.
At a later time, I want to retreive that file into a MailItem object.  I
cannot get

Set ObjMsg = GetObject("C:/Mail.msg")

to work, and the only alternative that I can find is

Set ObjMsg = appOutlook.CreateItemFromTemplate("C:/Mail.msg")

the problem with this is that it creates a NEW MailItem that is not sent,
and therefore I can view it, but I cannot Reply, or Forward...

Any help would be appreciated...

Regards,
John Foster



Mon, 31 Jan 2005 21:12:19 GMT  
 Retreiving an Outlook msg from a file in VB
You're not really going to be able to do that. Why not just save those
messages (or copies of them) into another folder where they will
retain all their properties as Outlook MailItem's?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Quote:
> I have an application that traps the Item Add event on the Sent
Items
> folder.  My application saves the Item (MailItem) to disk as a .msg
file.
> At a later time, I want to retreive that file into a MailItem
object.  I
> cannot get

> Set ObjMsg = GetObject("C:/Mail.msg")

> to work, and the only alternative that I can find is

> Set ObjMsg = appOutlook.CreateItemFromTemplate("C:/Mail.msg")

> the problem with this is that it creates a NEW MailItem that is not
sent,
> and therefore I can view it, but I cannot Reply, or Forward...

> Any help would be appreciated...

> Regards,
> John Foster



Tue, 01 Feb 2005 22:22:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOW TO in VB :Outlook MSG DROP in Explorer creates a MSG File

2. Please Help with file .msg (Outlook file)

3. How to retreive and treath a file attached to a mail receive in outlook

4. See if a Outlook.Mailtem is a .msg-file or an item in a folder

5. Opening .msg files in Outlook via COM

6. Importing MSG files back into Outlook

7. Can I get .MSG files back into Outlook???

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

9. reading outlook msg files

10. Outlook .MSG File Viewer???

11. How to open an Outlook 98 .MSG file?

12. Accessing .msg files without Outlook installed on PC

 

 
Powered by phpBB® Forum Software