c#在虚拟机下打开Powerpoint Presentation

时间:2013-02-01 21:10:08

标签: c# virtual-machine powerpoint-2007

我尝试使用以下代码

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作为参考。

1 个答案:

答案 0 :(得分:1)

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