-1

I tried to use the following code

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

or

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

to open PowerPoint file under Virutal PC, all the time it fails, but under native PC, no problem.

I use VS 2010, with Powerpoint library 12.0 as reference added.

David Basarab
  • 72,212
  • 42
  • 129
  • 156
  • It "fails"? What happens? Any kind of error message? Anything in the event log? It will be difficult for people to have any idea of what could be going wrong if you don't provide more details about what you're seeing. – Beska Feb 01 '13 at 21:29

1 Answers1

1

Maybe you should install PowerPoint assembly into GAC in Virtual PC.

ToXyS
  • 31
  • 1
  • Thanks! in virtual PC, PowerPoint assembly is already installed. Under virtual PC, I initially use PowerPoint assembly 14.0 in VS 2010 for powerpoint 2007, it reports error. Then change the assembly to 12.0. It does not report error any longer. but the powerpoint file could not be open all the time. using the simiar code to open Excel 2007 under virtual PC, it is OK! no any issue. – user2033928 Feb 02 '13 at 15:10