【问题标题】:c# Open Powerpoint Presentation under virtual machinec#虚拟机下打开Powerpoint Presentation
【发布时间】:2013-02-01 21:10:08
【问题描述】:

我尝试使用以下代码

PowerPoint.Application objPPt = new PowerPoint.Application();
objPPt.Presentations.Open2007(strFileName, Core.MsoTriState.msoFalse, Core.MsoTriState.msoFalse, Core.MsoTriState.msoTrue, Core.MsoTriState.msoFalse);

objPPt.Presentations.Open(strFileName, Core.MsoTriState.msoFalse, Core.MsoTriState.msoFalse, Core.MsoTriState.msoTrue);

在Virutal PC下打开PowerPoint文件,一直失败,但是在本地PC下,没问题。

我使用 VS 2010,添加了 Powerpoint 库 12.0 作为参考。

【问题讨论】:

  • 它“失败”了?发生什么了?任何类型的错误信息?事件日志中有任何内容吗?如果您不提供有关所见内容的更多详细信息,人们将很难知道可能出了什么问题。

标签: c# virtual-machine powerpoint-2007


【解决方案1】:

也许您应该将 PowerPoint 程序集安装到 Virtual PC 中的 GAC 中。

【讨论】:

  • 谢谢!在虚拟 PC 中,已安装 PowerPoint 程序集。在虚拟PC下,我最初在VS 2010中使用PowerPoint assembly 14.0 for powerpoint 2007,它报告错误。然后将程序集更改为 12.0。它不再报告错误。但是powerpoint文件无法一直打开。在虚拟PC下使用类似代码打开Excel 2007,就OK了!没有任何问题。
猜你喜欢
  • 1970-01-01
  • 2017-04-14
  • 2014-01-31
  • 1970-01-01
  • 2016-04-16
  • 1970-01-01
  • 2011-04-01
  • 2012-05-31
  • 1970-01-01
相关资源
最近更新 更多