How to create “.msg” file without using outlook in

2019-07-23 06:39发布

问题:

I am using outlook 2010. i drag and drop single contact to desktop. contact created on desktop with ".msg" extensions. this file create in local folder using VC++/MFC

回答1:

A few options:

  1. MSG file format is documented, so you can use straight OLE storage API. http://msdn.microsoft.com/en-us/library/cc463912(v=exchg.80).aspx

  2. Use Extended MAPI (OpenIMsgOnIStg).

  3. Use Redemption and its RDOSession.CreateMessageFromMsgFile method. All you have to do is call CreateMessageFromMsgFile, populate the properties of the returned RDOMail object, call RDOMail.Save.