开发者

C# Outlook interop and OpenSharedItem for opening MSG files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations 开发者_开发技巧for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 2 years ago.

Improve this question

Is there any tutorial or resource I can follow in order to use the OpenSharedItem outlook interop method. My goal is to read MSG files using it (as it can apparently do so).


Thanks Svetlozar, I've used the resources to create something like the following:

Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();

var item = app.Session.OpenSharedItem("C:\\test.msg") as Microsoft.Office.Interop.Outlook.MailItem;
string body = item.HTMLBody;
int att = item.Attachments.Count;

It may be useful to others looking for a quickstart as I was.


How to: Create a Contact Item from a vCard file and Save the Item in a Folder

How to: Import Saved Items using OpenSharedItem

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜