While it is possible to generate PowerPoint presentations automatically using Office Automation, this is not recommended for use on a server. How can you go about generating a PowerPoint presentation without using Office Automation?
While it is possible to generate PowerPoint presentations automatically using Office Automation , this
Share
Another option that didn’t get mentioned, which was the route we ultimately took, is to make use of the Open XML file formats that are supported naively in Office 2007 and in Office XP via a compatibility pack. Using the Open XML SDK 1.0 getting something working turned out to be surprisingly straightforward.
First, a generic template file was prepared with tokens put in place of the content that would need to be replaced. Next, a reference to DocumentFormat.OpenXml needs to be added to the project. The code itself will reference the DocumentFormat.OpenXml and DocumentFormat.OpenXml.Packaging namespaces. Finally, the code to loop through the slides looks like the following: