Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VBA script to insert PDF object into a word document

Posted on 2009-05-19
2
Medium Priority
?
1,712 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

581 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