【发布时间】:2018-04-26 01:03:57
【问题描述】:
我正在编写一个通过删除所有恶意内容来清理文件的服务。我正在使用这样的 Interop Excel 和 Word api:
Excel
var excelApp = new Microsoft.Office.Interop.Excel.Application();
excelApp.Visible = false;
excelApp.AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable;
try
{
var workbook = excelApp.Workbooks.Open(fileToClean.InputFileName);
单词
var wordApp = new Microsoft.Office.Interop.Word.Application
{
Visible = false,
AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable
};
try
{
var wordDoc = wordApp.Documents.Open(fileToClean.InputFileName, false, true);
我正在尝试找到一种类似的方法来打开 .eml Outlook 文件。 我找不到任何使用 Outlook 互操作打开 .eml 文件的方法。
【问题讨论】:
标签: c# outlook office-interop eml