【发布时间】:2020-05-21 21:22:57
【问题描述】:
为了使用 OpenSharedItem Outlook 互操作方法,我可以遵循任何教程或资源吗?我的目标是使用它读取 MSG 文件(apparently 可以这样做)。
【问题讨论】:
标签: c# interop outlook office-interop msg
为了使用 OpenSharedItem Outlook 互操作方法,我可以遵循任何教程或资源吗?我的目标是使用它读取 MSG 文件(apparently 可以这样做)。
【问题讨论】:
标签: c# interop outlook office-interop msg
感谢 Svetlozar,我使用这些资源创建了类似以下内容:
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;
对于像我一样寻找快速入门的其他人可能会有用。
【讨论】: