【发布时间】:2016-01-08 16:31:54
【问题描述】:
我正在使用 c# 开发 Office PowerPoint 2007。
我想打开 power point 文档。我附上了代码sn-p。
我还添加了对Microsoft.Office.Interop.PowerPoint.dll的引用
Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();
ppApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;
Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(@"D:\Office Guru Support Files\temp.pptx", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoTrue);
但我收到这样的错误消息
“Microsoft.Office.Core.MsoTriState”类型在未引用的程序集中定义。您必须添加对程序集 'office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' 的引用。
【问题讨论】:
标签: c# winforms powerpoint