Solved

VBA script to insert PDF object into a word document

Posted on 2009-05-19
2
1,339 Views
Last Modified: 2012-06-27
I need a VBA script to insert a PDF Object into a MSWord dorcument
0
Comment
Question by:rob546109
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 37

Accepted Solution

by:
Joanne M. Orzech earned 500 total points
ID: 24431896
Just record a macro that does it....

This code inserts the object based on an existing file:
    Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7", _
        FileName:="C:\DOCS\June Publication.pdf", LinkToFile:=False, _
        DisplayAsIcon:=False

Or:

    Selection.InlineShapes.AddOLEObject ClassType:="AcroExch.Document.7", _
        FileName:="", LinkToFile:=False, DisplayAsIcon:=False
0
 
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 24434794
Thank you!  Glad I could help.
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question