Read the complete article on converting PowerPoint presentations to Word documents using C#: https://blog.aspose.com/2021/08/02/convert-powerpoint-to-word-using-csharp/
Last active
August 3, 2021 04:53
-
-
Save aspose-com-gists/e3fcc8485e0a474ae25de9ce939268aa to your computer and use it in GitHub Desktop.
Convert PowerPoint to Word using C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the PowerPoint presentation | |
using(Aspose.Slides.Presentation presentation = new Aspose.Slides.Presentation("pres.pptx")) | |
{ | |
using (var stream = new MemoryStream()) | |
{ | |
// Save presentation to memory stream | |
presentation.Save(stream, SaveFormat.Html); | |
stream.Flush(); | |
stream.Seek(0, SeekOrigin.Begin); | |
// Load the content of the presentation to a Word document | |
var doc = new Aspose.Words.Document(stream); | |
// Save the Word document | |
doc.Save("pres.docx", Aspose.Words.SaveFormat.Docx); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment