Word to PPTX conversion doesn't preserve hyperlinks in .NET

here is an example - Convert DOCX to PPT via C# .NET or with free Online Converter | products.aspose.com

However when I try to use it, at

// Load the content of the Word document to a Presentation
var pptPresentation = new Aspose.Slides.Presentation(stream);

It comes up with an error about unknown format, even though I follow the code example - so couldn’t fully test


This Topic is created by Atir_Tahir using Email to Topic tool.

@chris,

Can you please share the source word file and generated presentation along with intermediated HTML file to verify the issue further on our end.

No doc with image links works. You can try any - here is my word doc input and the resulting html file.

https://1drv.ms/u/s!AhhDAsBLrPCpiJNHRoYrLVYPR8hE7w?e=DtanQi

@chris

I regret to share that there is no provision on Aspose.Slides API to load the HTML file directly as Stream inside Presentation class constructor. The API expect valid Presentation file (PPT, PPTX, ODP etc) either on disk or from stream. The error that you are getting is correct and it is expected behaviour of the API. We will update the example in the shared link as well. The API only allows importing HTML content inside TextFrame of any shape inside presentation slide only. Please consider following example for importing HTML content.

The code used is the code your website recommended to move from Doc to PPTX. So what is the recommended code to do that?

@chris

I agree with you and we are going to update the code on website. I have already shared the sample code that you can use to import HTML inside PowerPoint. You can export word document page by page to HTML and then import individual HTML files to separate slide shape text frames to achieve the desired results.