0

Is there any code in PowerPoint VSTO (VB.NET) to insert a PDF file to slide?

In PowerPoint VBA below is the code,

Set oShp = oSld.Shapes.AddOLEObject(Left:=100, Top:=100, Width:=200, Height:=300, Classname:="Shell.Explorer", Link:=msoFalse)
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Codename K
  • 890
  • 4
  • 23
  • 52

1 Answers1

0

I'd suggest creating a screenshot of the page which you need to show in PowerPoint slide and insert that slide instead.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Just like viewing in a PDF viewer, the inserted PDF must be able to be viewed page by page inside one slide. – Codename K Jan 31 '15 at 16:51
  • Suggestion: before trying to automate PowerPoint, try producing the desired effect manually within PowerPoint. If you can't do it manually, there's a good, though not 100%, chance that you can't do it in code either. In this case, you can insert a PDF on a slide as an object but you can't open it "in-place" as near as I can tell; that is, you can't browse through the PDF on the slide. You can launch the PDF in whatever app "owns" PDF files though. Set the PDF's action setting to On Click: Open. – Steve Rindsberg Feb 01 '15 at 16:18