Question

Is there a way to programmatically create PowerPoint presentations? If possible, I'd like to use C# and create PowerPoint 2003 presentations.

Was it helpful?

Solution

Yes, you can.

You will want to look into MSDN which has a pretty good introduction to it.

I might give you a word of warning, Microsoft Office interop is compatible with an API which is now more than 10 years old. Because of this, it is downright nasty to use sometimes. If you have the money to invest in a good book or two, I think it would be money well spent.

Here's a starting point for you. Use the search feature on MSDN MSDN Webpage. It's good for any Microsoft C# .NET style stuff.

Specifically in regards to your question, this link should help: Automate PowerPoint from C#. EDIT LINK NOW DEAD :(. These two links are fairly close to the original KB article:

Automate Powerpoint from C# 1/2

Automate Powerpoint from C# 2/2

Finally, to whoever downvoted this: We were all learning one day, how to do something as a beginner is most definitely programming related, regardless of how new someone might be.

OTHER TIPS

OpenXML looks like the way to go from a web app.

Using the interop libraries is not recommended, as others have stated.

You can also look at Aspose Slides, a component for .NET and Java that makes it easy to generate powerpoint documents.

If you don't really need PowerPoint compatible output, consider using a markup language such as LaTeX with the Beamer package to produce a PDF of the presentation, or use HTML and javascript in a manner similar to Slidy. If you need fancy effects, it might still be easier to use SVG, and you'd have the benefit of getting output that can be reliably viewed with free software.

http://msdn.microsoft.com/hi-in/magazine/cc163471(en-us).aspx

Use this link. Although this is in VB.NET, C# supports the same.

You may also try out SlideMight, a tool for merging hierarchical data with PowerPoint templates.

SlideMight supports:

  • text substitution in text fields, tables and notes
  • image substitution, from raw data, files and URLs
  • images in tables nested
  • iterations over data to create slides
  • iterations to populate tables, possibly spanning multiple slides
  • special formatting for specific cell values
  • hyperlinks to generated slides

Input data format is at this time just JSON. There are versions for Windows and Mac OS X.

More information is at http://www.SlideMight.com

Disclaimer:

I am the owner of Delftware Technology, the company that developed SlideMight. And I am one of the developers.

You can use Essential Presentation product from Syncfusion Software Private Limited. This product can be used to

  1. Create and manipulate PowerPoint presentations
  2. Open, modify, and save existing PowerPoint presentations
  3. Convert PowerPoint presentations to PDF or Image

More information is at https://help.syncfusion.com/file-formats/presentation/overview

Disclaimer: I work for Syncfusion Software Private Limited

A really simple solution can be found in the software SlideFab 2. It requires no coding and allows it to automatically dozens and hundreds of slides within minutes (e.g. creating an Excel model and automatically creating Powerpoint slides within 2 minutes (realtime) https://slidefab.com/hello-world/ ).

SlideFab aligns windows of Excel and Powerpoint next to each other and setting it up is basically 1) selecting an Excel range, 2) selecting Powerpoint shape, 3) clicking the crosshair button of SlideFab to link it.

Example: Linking an Excel range to Powerpoint table

It allows various export modes:

It supports looping to create multiple custom-tailored copies of a given template presentation where each copy might can be based on different data showing different texts

Setting up a loop

It has a lot more features, such as supporting Excel tables and named ranges, adding sections, creating multiple files, sorting slides based on Excel values, conditionally removing/excluding parts based on Excel formulas and much more.

SlideFab 2 lite is available for free at https://slidefab.com/lite

SlideFab panels and slide making preview all opened

This is what it looks like creating slides: SlideFab 2. Slide making preview window showing how SlideFab automatically creates Powerpoint slides from an Excel workbook

Disclaimer: I am the developer and owner of SlideFab

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top