There may be cases where you have a PowerPoint presentation and want to create a document that describes its contents in detail. For that, you can convert your PPTX/PPT files to Word format and modify the Word file to enter the details for each slide. In this article, you will learn how to convert PowerPoint PPTX/PPT files to Word format programmatically using C++.
- C++ API for Converting PowerPoint Files to Word Format
- Convert PowerPoint PPTX/PPT Files to DOCX Format using C++
Note: You may want to check out Aspose PowerPoint to Word Converter, which is a live implementation of the primary procedure in this article.
C++ API for Converting PowerPoint Files to Word Format
In order to convert PowerPoint presentations to Word documents, we will use the Aspose.Slides for C++ and Aspose.Words for C++ APIs. The former is an API for working with PowerPoint files, whereas the latter is used to create, read and modify Word documents. We will use the Aspose.Slides for C++ API to convert the PowerPoint file to HTML format and the Aspose.Words for C++ API to convert the generated HTML to Word format. You can either install the APIs through NuGet or download them directly from the Downloads section.
PM> Install-Package Aspose.Slides.Cpp
PM> Install-Package Aspose.Words.Cpp
Convert PowerPoint PPTX/PPT Files to DOCX Format using C++
The following are the steps to convert PowerPoint PPTX/PPT Files to DOCX Format using C++.
- Load the PowerPoint file using the Aspose::Slides::Presentation class.
- Create an instance of the MemoryStream class.
- Save the presentation to the stream.
- Create an instance of the Aspose::Words::Document class using the stream object.
- Save the DOCX file using the Aspose::Words::Document->Save(const System::String & fileName, Aspose::Words::SaveFormat saveFormat) method.
The following sample code shows how to convert PowerPoint PPTX/PPT Files to DOCX Format using C++.
Get a Free License
In order to try the API without evaluation limitations, you can request a free temporary license.
Conclusion
In this article, you have learned how to convert PowerPoint PPTX/PPT files to Word documents using C++. We used the Aspose.Slides for C++ API to convert PPTX/PPT files to HTML format and Aspose.Words for C++ API to convert the generated HTML to DOCX format. To learn more about these APIs, you can visit their official documentation. In case of any queries, please feel free to reach us at our free support forum.