Hi, I am using Aspose.Slide to find the embedded word document in the attached power point presentation. I can’t find it using Shape and OleObjectFrame. Can you advise me on where are these word documents located and how to save them as separate word documents. Thank you.
Hi James,
public static void ReadPPTOle(String file, string path){//Load the PPT to PresentationEx objectPresentation pres = new Presentation(path + file);//Access the first slideSlide sld = pres.Slides[0];Shape shape = null;for (int i = 0; i < pres.Slides.Count; i++){sld = pres.Slides[i];for (int j = 0; j < sld.Shapes.Count; j++){shape = sld.Shapes[j];if (shape is OleObjectFrame){//Cast the shape to OleObjectFrameOleObjectFrame oof = (OleObjectFrame)shape;Console.WriteLine(String.Format("%s\t\t\t\t%s", oof.ObjectName, oof.ObjectProgId));String FileType = “”;if (oof.ObjectName.Equals(“Worksheet”) && oof.ObjectProgId.Equals(“Excel.Sheet.12”)){FileType = “.xlsx”;}else if (oof.ObjectName.Equals(“Worksheet”) && oof.ObjectProgId.Equals(“Excel.Sheet.8”)){FileType = “.xls”;}else if (oof.ObjectName.Equals(“Document”) && oof.ObjectProgId.Equals(“Word.Document.12”)){FileType = “.docx”;}else if (oof.ObjectName.Equals(“Document”) && oof.ObjectProgId.Equals(“Word.Document.8”)){FileType = “.doc”;}else if (oof.ObjectName.Equals(“Presentation”) && oof.ObjectProgId.Equals(“PowerPoint.Show.12”)){FileType = “.ppsx”;}else if (oof.ObjectName.Equals(“Presentation”) && oof.ObjectProgId.Equals(“PowerPoint.Show.8”)){FileType = “.pps”;}else if (oof.ObjectName.Equals(“Acrobat Document”) && oof.ObjectProgId.Equals(“AcroExch.Document.7”)){FileType = “.pdf”;}else{FileType = “.txt”;}if (oof != null){FileStream fstr = new FileStream(path + “Extracted_OLE_Slide_” + i.ToString() + " OleIndex_" + j.ToString() + FileType, FileMode.Create, FileAccess.Write);byte[] buf = oof.ObjectData;fstr.Write(buf, 0, buf.Length);fstr.Position = 0;fstr.Flush();fstr.Close();System.Console.WriteLine(“File created…”);}}}}}
I have tried that on every slide but it didn’t find the word documents. There is a total of 6 word docs embedded. I used another text extraction software and a forensic software to verify the result. Is there a hidden area that can hold ole in ppt other than slides?
Hi James,
We are sorry for your inconvenience. Can you please share slide numbers and shape images that are Ole frame with Word Docs. Unfortunately, I have not been able to observe the Word Doc Ole frames in my scanning. Please share so that I may investigate it and help you further in this regard.
Many Thanks,
Hi Mudassir,
Hi James,
I think the version is 2003-2007. Not exactly sure. I was able to open it using aspose.slide. It seems that these embedded word documents are hidden somewhere. None of the slides have them I looked in the master slides too. Do you think there is anywhere else these might be hidden under? I can see the context of these word documents when I open the ppt using notepad. I used multiple text extraction software. These software was able to get the text of ppt along with all the word documents too.
Hi James,
Hi James,
Our product team has investigated the issue on their end. There’re a number of MSGraph embedding, but no MSWord embedding. Could you please share the slide numbers and corresponding .doc files where by the corresponding embedding of MS Word can be found.
Many Thanks,
Hi James,
As requested earlier, our product team has investigated the issue on their
end. There’re a number of MSGraph embedding, but no MSWord embedding.
Could you please share the slide numbers and corresponding .doc files
where by the corresponding embedding of MS Word can be found or we may close the issue on our end.
Many Thanks,