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
Solved

VBA script to insert PDF object into a word document

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
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.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…

840 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