我已经安装了 Visual Studio Tools for Office (VSTO),因此可以将 Microsoft.Office.Interop.Outlook.dll 用于我的 .Net 应用程序。但是,我收到以下错误。我认为它与注册表项有关,但我不确定。Microsoft.Office.Interop.Outlook.dll 存在,但注册表可能正在其他地方寻找它?我以前在没有问题的计算机上使用这个 .dll 库。那时,我没有安装 VSTO,但它是类似的。你知道我该如何解决这个问题吗?
第 3 行在屏幕截图中引发了以下异常
using Microsoft.Office.Interop.Outlook;
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
但他们没有帮助