Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
Created January 11, 2024 01:07
Show Gist options
  • Save conholdate-gists/4daf34f0c64602fe555aec6279d5350b to your computer and use it in GitHub Desktop.
Save conholdate-gists/4daf34f0c64602fe555aec6279d5350b to your computer and use it in GitHub Desktop.
Convert Word DOCX DOC Document to PPT PPTX Presentation in C# .NET
// Load the source DOCX file
using (Converter converter = new Converter("sample.docx"))
{
// Set custom properties of PresentationConvertOptions class
GroupDocs.Conversion.Options.Convert.PresentationConvertOptions options = new GroupDocs.Conversion.Options.Convert.PresentationConvertOptions
{
PageNumber = 2,
PagesCount = 1,
Format = GroupDocs.Conversion.FileTypes.PresentationFileType.Ppt
};
// Convert Word DOCX to PPT Presentation
converter.Convert("converted.ppt", options);
}
// Load the source DOCX file
Converter converter = new Converter("sample.docx");
// Create an object of PresentationConvertOptions class
GroupDocs.Conversion.Options.Convert.PresentationConvertOptions options = new GroupDocs.Conversion.Options.Convert.PresentationConvertOptions();
// Convert Word DOCX to PPTX Presentation
converter.Convert("Presentation.pptx", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment