views:

5774

answers:

4

Is there any good way to use a windows application written in C# to display/control a powerpoint slideshow? Ultimately I would like to show thumbnails in a form and clicking these thumbnails would advance the slides shown on a second monitor (similar to using Powerpoint itself to show a slideshow on a second monitor).

I would like to be able to use Powerpoint Viewer if Powerpoint is not installed.

There seems to be some ActiveX-controls that allows integration of Powerpoint in a form, but most of these seem to cost money, does anyone have experience using one of these controls?

Edit: I know that there is an object model accessable by adding a reference to Microsoft.Office.InterOp.Powerpoint, but I want to be able to distribute the resulting program without having Microsoft Office as a prerequisite, that was why I mentioned Powerpoint Viewer because it can be distributed freely.

+2  A: 

One of our softwares here at work does that. Initially we used MS Office but recently we switched to use OpenOffice.org Uno since it offers better control than MS Office and is easier to work with. It has .NET CLI-bindings.

To answer your question, yes it can be done but our engineers would recommend you use OpenOffice.org instead.

David Holm
Uno sounds interesting, I will check it out and give you an upvote when I have enough reputation...
Berg
Here you go Berg enough rep :)
Gab Royer
A: 

I have used the Word toolkit from Aspose -- they have a Powerpoint toolkit too that I think would be worth looking at.

http://www.aspose.com/categories/file-format-components/aspose.slides-for-.net-and-java/default.aspx

Lou Franco
+1  A: 

Just like with Microsoft Excel and Word, Powerpoint has an Object Model that you can access in code by including a reference in your project to:

Microsoft.Office.InterOp.Powerpoint.

I've used the Excel and Word models, but haven't used the one for Powerpoint. You can get a little taste of what's available by opening up the Object Browser once you've included the reference to see what kind of functionality is available. This might be a viable solution for you if you don't want to use a 3rd party tool to access the object model.

JettGeek
I knew about the object model but it requires that Powerpoint is installed, I would like to be able to distribute the program without having Office as a prerequisite.
Berg
please read the question before answering...
Anonymous Type
+4  A: 

This kb lays out the basics for working with the powerpoint presentation viewer object model. I'd suggest you include the viewer when you distribute your application.

http://support.microsoft.com/kb/265385

Once you get a reference to the viewer (top level) object it is basically the same as working with the powerpoint.presentation object model, but with less functionality (i.e. editing, etc)

If you are working with Powerpoint 2007, then you can add editing functionality by using the System.XML and related namespaces to work with the presentation file as an open xml file.

Regarding the comments about UNO/openoffice.org, I think these miss the point, as you cannot use UNO for working with powerpoint, it is for openoffice and that was not the origianl requirement of the questioner.

there are 3rd party toolsets like aspose, but then your goal was to work with the powerpoint viewer component (free) so I'm guessing you want to avoid paying for dev tools? Either way viewer components OM is perfectly suitable for displaying and previewing and existing slide show. (you will need one copy of Powerpoint so that you can author the presentation from scratch, plus Visual Studio to create the VSTO project).

Anonymous Type