0

I need to extract embedded (without links) pdf documents in PowerPoint file. I can extract embedded files from Excel using ActiveSheet.OLEObjects and checking for ProgID. Then I copy it to clipboard and save as described here But for some reason I could not find equivalent to Excel.OleObject in PowerPoint. The closest thing I think is shape.OLEFormat.Object property but it does not support Copy method. I checked this but if it is possible I need a VBA solution.

Community
  • 1
  • 1
user1429899
  • 288
  • 5
  • 15

2 Answers2

0

What you need to do is open the embedded PDF using DoVerb:

ActivePresentation.Slides(1).Shapes(1).OLEFormat.DoVerb

going from there you are depending on your installed software to either address saving the file using SendKeys or if available an API on Adobe Reader.

For a full discussion on this read the thread on the MSDN Forums here: https://social.msdn.microsoft.com/Forums/en-US/235dde1a-13bb-4f07-8eb4-04ef1121a747/export-a-pdf-file-from-powerpoint-with-vba?forum=officegeneral

Maarten van Stam
  • 1,901
  • 1
  • 11
  • 16
  • Added to the above, I found another thread that might be helpful for you on StackOverflow discussing about the same thing you are looking for: http://stackoverflow.com/questions/23970827/how-to-use-vba-in-powerpoint-to-open-an-embedded-ole-object – Maarten van Stam Mar 21 '16 at 23:24
0

I accidently noticed that copying the PowerPoint shape itself does the job.

user1429899
  • 288
  • 5
  • 15