Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2017, 12:51 PM
bilich bilich is offline Insert PDF into Word Windows 10 Insert PDF into Word Office 2013
Novice
Insert PDF into Word
 
Join Date: Mar 2017
Posts: 3
bilich is on a distinguished road
Default Insert PDF into Word

Hi,



I have a Word Doc that I want to insert a PDF into. I already know how to do this by going to Insert and then Object.

This is not what I want though. I want it to work like the SmartArt function works for pictures (Have a set size for the image and when you click on it you will be prompted to open a PDF). Is there a way to have something similar happen for PDF's?

The only reason I want to be able to do this is to create a template for people to click the box and easily be able to insert the PDF. There are some non-tech people that would be using this and it would make it much easier for them.


Thanks for your help!
Reply With Quote
  #2  
Old 03-02-2017, 03:12 PM
macropod's Avatar
macropod macropod is offline Insert PDF into Word Windows 7 64bit Insert PDF into Word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Insert|Object is as simple as it gets. That said, if you insert the PDF object as an icon, double-clicking on it will open it in your pdf reader. Inserting it without the icon option means you can only insert the first page of however much of the pdf will fit on the current page.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-03-2017, 05:47 PM
bilich bilich is offline Insert PDF into Word Windows 10 Insert PDF into Word Office 2013
Novice
Insert PDF into Word
 
Join Date: Mar 2017
Posts: 3
bilich is on a distinguished road
Default

Yes I know that it is an easy process, but I want to be able to have a formatted section that a user can click on and it will open the file explorer so they can pick a PDF and it will be placed in the formatted section. This will ensue all PDF's are placed with the same borders and such. All the PDF's that would need to be placed would be one page only. If there is a way to do this by an excel function or some sort of VBA coding I would like to know because so far in my research I have not found anything.


Thanks!
Reply With Quote
  #4  
Old 03-03-2017, 10:05 PM
gmayor's Avatar
gmayor gmayor is offline Insert PDF into Word Windows 10 Insert PDF into Word Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

An Excel function? I thought you wanted to insert the PDF into Word? If you put a macrobutton field where you want the PDF. The size of the PDF will be determined by the distance between the margins at that point.

{ MACROBUTTON InsertPDF Click to select and insert PDF file }

and double click that field to run the InsertPDF macro below, it will insert the selected PDF at the field location
Code:
Sub InsertPDF()
'Graham Mayor - http://www.gmayor.com - Last updated - 04/03/2017
Dim strPDF As String
Dim oRng As Range
    Set oRng = Selection.Range
    strPDF = BrowseForFile
    If Not strPDF = vbNullString Then
        oRng.Text = ""
        ActiveDocument.InlineShapes.AddOLEObject _
                ClassType:="AcroExch.Document.DC", _
                FileName:=strPDF, _
                LinkToFile:=False, _
                DisplayAsIcon:=False, _
                Range:=oRng
    End If
lbl_Exit:
    Exit Sub
End Sub

Private Function BrowseForFile() As String
'Graham Mayor - http://www.gmayor.com - Last updated - 04/03/2017
Dim fDialog As FileDialog
    On Error GoTo Err_Handler
    Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
    With fDialog
        .Title = "Select the document to insert"
        .AllowMultiSelect = False
        .Filters.Clear
        .Filters.Add "PDF Format", "*.pdf"
        .InitialView = msoFileDialogViewTiles
        If .Show <> -1 Then GoTo Err_Handler:
        BrowseForFile = fDialog.SelectedItems.Item(1)
    End With
lbl_Exit:
    Exit Function
Err_Handler:
    BrowseForFile = vbNullString
    Resume lbl_Exit
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Tags
insert, pdf

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert PDF into Word How do I insert pictures directly into picture boxes by clicking the box instead of using INSERT>PIC Bree Word 1 06-24-2016 10:32 PM
Insert PDF into Word Insert Captions and Word Wrap TEAllred Word 1 11-22-2015 03:21 PM
Insert PDF into Word Is there anyway I can insert an easy bookmark in word? BayhDole Word 2 07-21-2015 08:43 PM
insert video into word doc Wordstop Word 2 07-19-2013 07:01 AM
how insert big word doc. into an email tbklus Word 0 09-15-2010 01:07 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft