We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Embedded PPT is Converted to Image after OLE Update

Hi Team,

I have recently run into an issue regarding embedded objects in Word. I have a .docx file with 4 embedded objects in it.

  • .xlsx file
  • .xls file
  • .pptx file
  • .ppt file

I can collect, edit and re-insert all of them into the .docx file, however when I want to open or save the updated objects from the root document, I cannot manage to do that with the .ppt file, while the others work fine. I could only save the updated .ppt file’s icon as an image, but its content seemed to be lost.

I attached a sample project in a zipped folder with the document I tried to process and the output document as well. You just need to run the application in console and give the input file path as an argument. It will generate the output file to the same location where the input file is.

Tried on Windows with the latest stable Aspose DLLs.

I would be grateful if you could help me.

Thanks in advance,
Tamas Boldizsar

sampleProject.zip (156.6 KB)

@tamas.boldizsar

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22075. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor

Thank you very much! I am looking forward to hearing from you soon.

@tamas.boldizsar

We will be sure to inform you via this forum thread once there is any update available on this issue.

@tahir.manzoor

I ran into another problem regarding this issue using the same application that I attached earlier.

I tried to convert the PPT file to PPTX during saving with setting Aspose.Slides.Export.SaveFormat to Pptx. Saving was successful this way, however when it comes to inserting the object back to the Word document (where InsertOleObject function is invoked), the following exception is thrown: “This is not a structured storage file.”.

Could you please check this one as well and investigate the problem if possible?

@tamas.boldizsar

We have not found this issue while using your shared application. Please modify your application and share it here for testing. We will investigate the issue and provide you more information on it.

@tahir.manzoor

I have modified the application, please find it attached. Now it converts embedded PPT to PPTX and fails when inserting this modified object to the document with the mentioned error message.

exception_when_inserting_ppt_converted_to_pptx_to_word.zip (71.6 KB)

@tahir.manzoor

Regarding my first issue, I experimented a bit meanwhile with the first application I attached and would like to share my experience with you:

  1. When I do not process the embedded PPT object with Aspose.Slides, just save the object to stream and insert that stream immediately back to the Word document, the embedded PPT can be opened in the result document. However, if I just load and save it with Aspose.Slides using the corresponding loadformats and saveformats (without writing something to it or any modification), it gets wrong.
  2. Also, I managed to save the embedded PPT from the document to disk after it had been loaded and modified with Aspose.Slides and it could be opened successfully as a standalone file. Maybe there is something wrong with saving the embedded PPT object to stream?

I do not know if this is helpful for you. I just wanted to let you know what I have found.

@tamas.boldizsar

We have logged this problem in our issue tracking system as WORDSNET-22132. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor

Thank you!

The issues you have found earlier (filed as WORDSNET-22075) have been fixed in this Aspose.Words for .NET 21.5 update and this Aspose.Words for Java 21.5 update.

@tamas.boldizsar

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-22132) as ‘Not a Bug’.

Your input Word document has embedded PPT file with ProgID PowerPoint.Show.8. In your code, you used Aspose.Slides to modify and re-save the presentation in PPTX format and stored it to memory stream. After that you embedded this re-saved PPTX presentation in the new Aspose.Words.Document but you did not use the new ProgID PowerPoint.Show.12 for the new PPTX format.

Please use the correct ProgID PowerPoint.Show.12 when inserting the PPTX file.

@tahir.manzoor

I am very glad to hear that the base issue has been fixed in Aspose.Words for .NET 21.5 release! That’s great news! Thank you very much!

Also, thank you for the help with WORDSNET-22132. Using the correct ProgID really solved the issue.

@tamas.boldizsar

Thanks for your feedback. We have closed the issue WORDSNET-22132. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

1 Like

@tahir.manzoor

I have just tested the original issue covered by WORDSNET-22075 with unlicenced Aspose.Words for .NET 21.6.0 which should already contain the fix, but I encountered the same problem as earlier.

I attached the sample project: it is the same as sampleProject.zip with the only difference that Aspose.Words is updated. Issue is the same: I could only save the updated PPT file’s icon as an image, but its content seemed to be lost. You can check it on the last page of output_root.docx.

One interesting thing found: if I change the output file’s extension to “.zip” and unzip it, then I can find and even open the embedded PPT file as a standalone file in word/embeddings folder.

Could you please help with that? May I have missed or done wrong something?

Thank you very much in advance!

WordEmbeddedObjects.zip (156.5 KB)

@tamas.boldizsar

We have tested the scenario using the latest version of Aspose.Words for .NET 21.6 and have not found the shared issue. So, please use Aspose.Words for .NET 21.6. We have attached the output DOCX with this post for your kind reference.
21.6.docx (73.1 KB)

@tahir.manzoor

First of all, thank you for your constant patience and helpfulness!

I have also used the latest version of Aspose.Words for .NET (21.6) in my testing environment, that’s why I have no idea why the issue still occurs at my side. I have tried to open the embedded PPT file in the document you attached, but it is still only a picture at me.

I would like to add some further details from my side what I have used during testing:

  • DLL versions: see image among attached screenshots (dlls.png)
  • Document viewer: Microsoft Office Word 2016

I have experienced 2 interesting things during testing:

  1. As I already mentioned above, I could find and open the embedded PPT file among the embeddings when I changed the output file’s extension to “.zip”.
  2. Using LibreOffice Writer to open the output Word document on Linux, I could open the embedded PPT file.

I attached some more screenshots too to demonstrate that in the original document (before OLE update) I am able to open and edit the PPT object in Word (pptOptionsInOriginalWordDocument.png), however, after OLE update in the output document - both in my output (pptOptionsInOutputWordDocument.png) and in the output you sent (pptOptionsIn21.6.docx.png) - I am only able to handle the object as a picture in Microsoft Office Word without reaching its real content.

I would be very grateful if you could further help with my issue.

Best regards,
Tamas Boldizsar

screenshots.zip (43.2 KB)

@tamas.boldizsar

Please insert ProgID for PPT as ‘PowerPoint.Slide.8’ to avoid the shared issue. Hope this helps you.

@tamas.boldizsar

We have noticed that the OleFormat.ProgId returns ‘PowerPoint.Show.8’ for PPT and when PPT is inserted with this ProgID, the OLE is shown as image in output DOCX. We have logged this issue as WORDSNET-22331. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

@tahir.manzoor

I appreciate your help, thank you very much!