PowerPoint and .NET - Any help?

P

Paul Selormey

I am trying to open PowerPoint document and display slides by
automation using the .NET interop library.

Here is my code (in C#)
-----------------------------------------------------
ApplicationClass powerPoint = new ApplicationClass();
powerPoint.Presentations.Add(MsoTriState.msoTrue);
powerPoint.Presentations.Open(@"E:\Msdn\office\WC101201.ppt",
MsoTriState.msoFalse,
MsoTriState.msoFalse,
MsoTriState.msoTrue);
Presentation present = powerPoint.ActivePresentation;
Slides slides = present.Slides;
Slide slide = slides[0];
SlideShowSettings settings = present.SlideShowSettings;
settings.Run();
----------------------------------------------------------

However, I only end up with exceptions. How is the best way
to do this? (just could be find any documents on this).

Best regards,
Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top