Convert PowerPoint to Word

If you plan 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).

  • When compared to Microsoft PowerPoint, the Microsoft Word app is more equipped with tools or functionalities for content.
  • Besides the editing functions in Word, you may also benefit from enhanced collaboration, printing, and sharing features.

Aspose.Slides and Aspose.Words

To convert a PowerPoint file (PPTX or PPT) to Word (DOCX or DOCX), you need both Aspose.Slides for C++ and Aspose.Words for C++.

As a standalone API, Aspose.Slides for C++ provides functions that allow you to extract texts from presentations.

Aspose.Words is an advanced document processing API that allows applications to generate, modify, convert, render, print files, and perform other tasks with documents without utilizing Microsoft Word.

Convert PowerPoint to Word

Use this code snippet to convert the PowerPoint to Word:

auto presentation = MakeObject<Presentation>();
auto doc = MakeObject<Aspose::Words::Document>();
auto builder = MakeObject<Aspose::Words::DocumentBuilder>(doc);

for (const auto& slide : presentation->get_Slides())
{
    // generates and inserts slide image
    auto bitmap = slide->GetThumbnail(1.0f, 1.0f);
    builder->InsertImage(bitmap);

    // inserts slide's texts
    for (const auto& shape : slide->get_Shapes())
    {
        if (ObjectExt::Is<AutoShape>(shape))
        {
            auto autoShape = System::AsCast<AutoShape>(shape);
            builder->Writeln(autoShape->get_TextFrame()->get_Text());
        }
    }

    builder->InsertBreak(Aspose::Words::BreakType::PageBreak);
}