+ Reply to Thread
Results 1 to 1 of 1

Thread: Embed PDF into Word

  1. #1
    Registered User
    Join Date
    08-01-2010
    Location
    Swindon, Wiltshire
    MS-Off Ver
    Excel 2003
    Posts
    30

    Angry Embed PDF into Word

    I have created a tool that writes out a Word document based on text stored in a spreadsheet.

    The last part of the process is to embed a PDF file into the Word document, unlinked and displayed as an icon.

    This code works fine when run in Word but when run from Excel inserts the file contents which is not what I want (and is unreadable anyway).

    wrdDoc.Shapes.AddOLEObject Anchor:=wrdApp.Selection.Range, ClassType:= _
    "AcroExch.Document.7", Filename:=UserForm1.Controls("TextBox" & FileRef).Value, _
    LinkToFile:=False, DisplayAsIcon:=True
    For information wrdDoc is created like this:

    Set wrdApp = CreateObject("Word.Application")
    Set wrdDoc = wrdApp.documents.Add(Template:=FullDotName)
    and the Filename:= is passed as a fully qualified text string.

    Any ideas how I can get the file embedding to work?
    Last edited by BillWilts; 06-10-2011 at 07:56 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0