Import and export *.msg (Outlook Message Format) through VBA

A

Anthony Yio

Hello,


In Ms Outlook, I can save my Task, Calendar, Contact, Note to a *.msg
file respectively. And then, through drag and drop, I can drag the *.msg
file back to the Ms Outlook Malibox (*.pst).

My question is, how do I through VBA save my task, calendar, note,
contact item from *.pst to files? And then, through VBA again, load back my
files back to the select *.pst.

thank you


Regards,
Anthony Yio
 
K

Ken Slovak - [MVP - Outlook]

You can easily save those items in code as MSG files by using the SaveAs
method with a type of olMSG. However, Outlook's object model doesn't have
methods to open a MSG file as the original item type. A 3rd party library,
Redemption (www.dimastr.com/redemption) does have that ability in its
MAPIUtils.GetItemFromMsgFile method.
 
D

Dmitry Streblechenko \(MVP\)

Or you can import the MSG file back into an existing Outlook item using
Safe*Item.Import in Redemption.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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