Free Support Forum - aspose.com

Embedded PPT is Converted to Image after OLE Update using .NET

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!