You can find detailed information at: Convert PowerPoint Presentation to Word Document using C++
Last active
September 13, 2021 12:28
-
-
Save aspose-com-gists/70bb50b808674e49279057d1f02c3f0c to your computer and use it in GitHub Desktop.
Convert PowerPoint Presentation to Word Document using C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File paths | |
const String sourceFilePath = u"SourceDirectory\\Slides\\SamplePresentation.pptx"; | |
const String outputFilePath = u"OutputDirectory\\SlidesToWord_out.docx"; | |
// Load the presentation file | |
auto presentation = System::MakeObject<Aspose::Slides::Presentation>(sourceFilePath); | |
// Create an instance of the MemoryStream class | |
auto stream = System::MakeObject<MemoryStream>(); | |
// Save the presentation to the stream | |
presentation->Save(stream, SaveFormat::Html); | |
stream->Flush(); | |
stream->Seek(0, SeekOrigin::Begin); | |
// Create an instance of the Document class using the stream | |
auto doc = System::MakeObject<Aspose::Words::Document>(stream); | |
// Save the Word document | |
doc->Save(outputFilePath, Aspose::Words::SaveFormat::Docx); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment