Solved

VBA script to insert PDF object into a word document

Posted on 2009-05-19
2
1,018 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
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.
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now