Convert PPTX to Word in C++

Powerful cross-platform C++ API for converting PowerPoint to Word using C++ code without Microsoft PowerPoint or Office

Convert PowerPoint to Word using Aspose.Slides and Aspose.Words

Aspose.Slides for C++ and Aspose.Words for C++ are powerful C++ libraries used to manipulate and convert PowerPoint presentations, Word documents, and other files. When you convert PowerPoint to Word, you are essentially moving the contents of a presentation’s slides to pages in a Word document.

Convert PowerPoint to Word in C++

You can convert PPTX to Word quickly with just a few lines of code

C++ code for converting 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);
}

How to convert PPTX to Word

  1. Install Aspose.Slides for C++ and Aspose.Words for C++

  2. Create an instance of the Presentation class and Doc class.

  3. Load the PPTX presentation you want to convert to Word.

  4. Generate images and texts based on the slides’ contents.

  5. Save the resulting Word document.

Free Online Converter

How to Convert PPT to HTML in Python

Other Supported Conversions

You can also convert PowerPoint to files in other formats