Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active August 3, 2021 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/e3fcc8485e0a474ae25de9ce939268aa to your computer and use it in GitHub Desktop.
Save aspose-com-gists/e3fcc8485e0a474ae25de9ce939268aa to your computer and use it in GitHub Desktop.
Convert PowerPoint to Word using C#
// 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