Is there a way to programmatically create PowerPoint presentations? If possible, I'd like to use C# and create PowerPoint 2003 presentations.
7 Answers
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.

- 28,526
- 15
- 68
- 103
-
15+1 for "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" – 10101010 Jan 06 '17 at 16:34
-
The second link seems to be dead. Is there another MS site that covers that topic now? – Tobi o' Bobi Apr 19 '18 at 08:26
-
2https://web.archive.org/web/20150101161205/http://support.microsoft.com/kb/303718 here's the archived version of the original link – asdf101 Dec 06 '20 at 11:45
-
Thanks! Didn't go trawling archives, but good to know it's there. – Spence Dec 13 '20 at 09:34
OpenXML looks like the way to go from a web app.
Using the interop libraries is not recommended, as others have stated.

- 3,065
- 1
- 26
- 15
-
While I would have used Open XML for a web app, I ended up using the interop library for my WinForm app. While it wasn't the absolute easiest thing to learn I had far more trouble with the native RichTextBox class. Definitely, should have started with it instead of trying to get Aspose Slides to work at first. I suppose Aspose would be the way to go for much larger projects, but for SEH America's test (a program that takes up to a week to make), the interop library is fine. – Caston Oct 30 '20 at 22:57
You can also look at Aspose Slides, a component for .NET and Java that makes it easy to generate powerpoint documents.

- 8,336
- 4
- 46
- 45
-
3Worth noting that this component works great for small presentations but has lots of memory issues with large or complex slides. For the price, that's a good thing to know. – Brent Waggoner Apr 24 '15 at 14:56
-
-
1I tried using Aspose, and not only did I have trouble getting everything downloaded and running, in the end, I learned that in order for anything to work I would need to get a license that would cost me a fortune. And you need to be a corporate entity, even for a trial license. – Caston Oct 30 '20 at 22:49
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.

- 5,675
- 28
- 39
-
Valid points, but it's also true that MS makes a viewer-only version of Powerpoint available for free download. Only works on Windows mind you. – j_random_hacker Jan 26 '09 at 05:03
-
http://msdn.microsoft.com/hi-in/magazine/cc163471(en-us).aspx
Use this link. Although this is in VB.NET, C# supports the same.

- 30,738
- 21
- 105
- 131

- 5,283
- 5
- 26
- 42
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.

- 188
- 1
- 2
- 6
You can use Essential Presentation product from Syncfusion Software Private Limited. This product can be used to
- Create and manipulate PowerPoint presentations
- Open, modify, and save existing PowerPoint presentations
- 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

- 654
- 9
- 15