Convert PowerPoint PPT and PPTX to DOC and DOCX

Contents
[ ]

If you intend to use textual content or information from a presentation (PPT or PPTX) in new ways, you may benefit from converting the presentation to Word (DOC or DOCX). For example, compared to the Microsoft Presentation app, the Microsoft Word app is more equipped with tools or functionalities that allow you to improve and manipulate content for different purposes.

Besides the numerous functions you get to use in a Word editor, you may also benefit from enhanced collaboration, printing, and sharing features. If necessary, you can easily transform your presentation into a poster or brochure (webpage or printed).

As a standalone API, Aspose.Slides for .NET provides functions that allow you to extract texts from presentations. To convert PPT to DOC or DOCX, you will have to use Aspose.Slides with another API.

Extracting the Text

You can start by using the GetAllTextFrames method from the SlideUtil class to extract the required text from an entire presentation. After the extraction, you can write the text into a DOC/DOCX document.

Creating the Word Document

After extracting the text from a presentation, you can use Aspose.Slides together with another API (Aspose.Words, for example) to create the Word (DOC or DOCX) file. This sample code demonstrates the projected operation:

using(Presentation presentation = new Presentation("pres.pptx"))
using (var stream = new MemoryStream())
{
    presentation.Save(stream, SaveFormat.Html);
    stream.Flush();
    stream.Seek(0, SeekOrigin.Begin);

    var doc = new Aspose.Words.Document(stream);
    doc.Save("pres.docx", Aspose.Words.SaveFormat.Docx);
}