Convert PPTX to Word in C++

Export PowerPoint slide content to Word using Aspose.Slides for C++ and Aspose.Words for C++.

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

Aspose.Slides for C++ can render slides as images, while Aspose.Words for C++ can create and save Word documents. Use both APIs when you need to move PPTX slide content into a DOCX document.

Convert PowerPoint to Word in C++

Use this C++ code to convert PPTX to Word:

PPTX to Word C++ Conversion Source Code

auto presentation = MakeObject<Presentation>(u"presentation.pptx");
auto wordDocument = MakeObject<Aspose::Words::Document>();
auto documentBuilder = MakeObject<Aspose::Words::DocumentBuilder>(wordDocument);

auto slideSize = Size(1200, 800);
for (auto&& slide : presentation->get_Slides())
{
    auto slideImage = slide->GetImage(slideSize);
    documentBuilder->InsertImage(slideImage);
    slideImage->Dispose();

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

wordDocument->Save(u"presentation.docx");
presentation->Dispose();

How to Convert PPTX to Word

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

  2. Create a Presentation instance from the source PPTX file.

  3. Create a Word Document and DocumentBuilder.

  4. Render slides with GetImage, insert the rendered images with DocumentBuilder, and save the result as DOCX.

Free Online Converter

Convert presentations and slides online.

Other Supported Conversions

You can also convert PowerPoint to files in other formats.