Trying to export the oleobjectframe object (shock wave Active X object ) from the PPT to the corresponding movie object. Could you please help on this.
Presentation presentation = new Presentation(“temp1.ppt”);
int totalSlide = presentation.Slides.LastSlidePosition;
for (slideIdx = 1; slideIdx <= totalSlide; slideIdx++)
Aspose.Slides.Slide slide = presentation.GetSlideByPosition(slideIdx);
foreach (Aspose.Slides.Shape currentShape in slide.Shapes)
if (currentShape is OleObjectFrame)
Aspose.Slides.OleObjectFrame oleObjectInfo = (Aspose.Slides.OleObjectFrame)currentShape;
if (oleObjectInfo.ObjectClassName == “Shockwave Flash Object”)
byte activeXData = oleObjectInfo.ObjectData;
Stream outputStream = new FileStream(“c:\temp\test1.flv”, FileMode.Create);
outputStream.Write(activeXData, 0, activeXData.Length);
Thanks and regards
You can first debug your slide to find out the OLE object properties like ObjectClassName, ObjectProgID and then apply the condistional statements. If problem persisits, provide the PPT for investigation.
Pretty sure about the code. Double checked it. Its fine. The resulting SWF is not playing.
Attached file includes
temp.swf (embeded SWF in the PPT)
result.SWF (the exported SWF file from the PPT)
ole.cs (source code)
Let me know.
There is definitley problem in writing the stream to file as your code only creates a file and does not write stream.
I beleive the last line outputStream.Write(activeXData, 0, activeXData.Length);.
does write the stream. If you mean to say outputStream.Flush() outputStream.Close() is missing I have tried that also.(that was a copy/paste problem in the file i sent)
Please correct me where i am going wrong.
There is some problem with Flash files when read / written as OLE using Aspose.Slides. An issue with issue id 11746 has been created and you will be informed as soon as it is fixed.
Could you please move this to the priority support forum as we have procured priority support recently. And let us know the ETA for this.
Thanks and regards