3 Ways to Embed a PDF Document in Microsoft Excel

This post is going to show you how to embed a PDF document inside a Microsoft Excel workbook.

By embedding a PDF document inside an Excel workbook, you can keep all your important documents in one place. This can be especially helpful if you need to share the documents with other people.

Portable Document Format files, or PDF’s, are incredibly popular document formats that are used by businesses and individuals all over the world. They are designed to be platform-independent, which means they can be opened on any type of device or operating system.

PDFs are very versatile, as they can be used for everything from storing scanned documents to creating complex forms. These can all be inserted into Excel so they are easily available for your spreadsheet user.

Embedding a PDF document is simple and easy to do. You just need to follow these steps, and you’ll be able to embed any PDF document in no time at all.

Embed a PDF Document from the Insert Tab

When you need to insert something into an Excel workbook, the Insert tab is the first place you should look!

You’ll be able to insert shapes, charts, pivot tables, and many other objects including PDF files from this menu.

Follow these steps to insert your pdf document into the Excel workbook.

  1. Go to the Insert tab in the ribbon.
  2. Click on the Object command found in the Text section.

This will open the Object menu.

  1. Go to the Create from File tab in the Object menu.
  1. Click on the Browse button and then choose the PDF file to insert from the file picker menu.
  1. Check the Link to file option if you want any future changes made to the source document to be reflected in the embedded file.
  2. Check the Display as icon option if you want to show an icon. If this is left unchecked then an image of the PDF contents will be inserted.
  3. Press the OK button to insert the PDF.

The above object will be inserted when the Display as icon option is selected.

The above object is inserted when both the Link to file and Display as icon options are left unchecked. This results in the image of the PDF contents shown as the icon for the file.

Fix the Embedded PDF File to a Cell

Once you have embedded your pdf file, there is one setting you might want to update so the file stays fixed to its cell.

Otherwise, when you insert, delete, or resize rows and columns in your workbook the embedded document will shift positions.

Right click on the PDF icon and select Format Object from the menu. This will open the Format Object menu.

Select the Properties tab and then select Move but don’t size with cells and press the OK button.

This will keep the PDF document icon anchored in place to a cell. The icon also won’t resized if you resize an intersecting row or column.

Open an Embedded PDF Document

Now that you have an embedded PDF document in your Excel workbook you will likely want to open the PDF file at some point.

There are two easy ways to open the embedded file.

Double left-click on the PDF icon to open the PDF file.

Right click on the PDF icon ➜ then choose Acrobat Document Object ➜ then select Open from the submenu options.

Either of these options will open the file in your PDF viewer of choice.

Change the Icon or Title of an Embedded PDF Document

After you have embedded your PDF file, you might decide you want to change the chosen icon.

The option to alter the icon or file name title after it’s already been embedded is hidden and not easily discoverable.

Follow these steps to change the icon or display title for your embedded PDF document.

  1. Right click on the PDF icon.
  2. Select Acrobat Document Object from the options.
  3. Select Convert from the submenu options.

This will open the Convert menu.

  1. Press the Change Icon button.

This will open the Change Icon menu.

  1. Press the Browse button and this will allow you to select a new icon.
  2. Enter your new title into the Caption input.
  3. Press the OK button in the Change Icon menu.
  4. Press the OK button in the Convert menu.

Your embedded PDF document will get the updated icon and title.

Change the Icon or Title of an Embedded PDF Document with a Keyboard Shortcut

There is actually also a legacy keyboard shortcut available for editing an embedded PDF object.

Press Alt + E + O + V on your keyboard to open the object Convert menu.

Embed a PDF Document with a Keyboard Shortcut

You can insert a PDF document using a keyboard shortcut and there are two available options for this.

You can access the Object command in the ribbon from the Alt hotkeys.

Press Alt + N + J on your keyboard and this will open the Object menu.

There is also a legacy keyboard shortcut for inserting objects that can still be used.

Press Alt + I + O on your keyboard to open the Object menu.

Note: The latter shortcut is much easier to remember as I is for Insert and O is for Object!

Embed All PDF Documents from a Folder with VBA

One thing that might frustrate you about inserting PDF’s into Excel is the inability to select multiple PDF files to batch insert.

Unfortunately, the Object menu does not allow you to select and insert multiple files.

This could be a major pain if you have to embed many PDF documents as you will have to repeat the manual process one by one.

Fortunately, it is possible to automate the process with a VBA macro!

You can create a VBA script that will insert all PDF files from a given folder.

Press Alt + F11 to open the VBA code editor and then place the following code into a module.

Sub EmbedPDFs()
Dim pdfFiles As String
pdfFiles = Dir("C:\Users\johnw\OneDrive\Desktop\PDF Files\")

Do While Len(pdfFiles) > 0
    If Right(pdfFiles, 3) = "pdf" Then
        ActiveSheet.OLEObjects.Add(Filename:= _
            "C:\Users\johnw\OneDrive\Desktop\PDF Files\" & pdfFiles _
            , Link:=False, DisplayAsIcon:=True, IconFileName:= _
            "C:\Users\johnw\OneDrive\Desktop\PDF Files\HowtoExcel.ico", _
            IconIndex:=0, IconLabel:=pdfFiles).Select
    End If
pdfFiles = Dir
Loop
End Sub

This code will loop through a folder and add any file which ends in pdf as an embedded object into the Excel workbook.

All you need to do is change the folder path and icon in the code to suit your needs.

Conclusions

Adding an embedded PDF document to your Excel file can be achieved through the Insert menu or with a keyboard shortcut.

Several customizations are possible with embedded PDFs such as the title caption and the display icon.

Unfortunately, you can embed multiple files at once through the user interface. But you can use VBA to automate the process when you need to insert many PDFs.

Do you ever embed PDF files into Excel? Do you know any other tips for adding PDFs? Let me know in the comments section below!

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and qualified actuary with over 15 years of experience. He has worked in a variety of industries, including insurance, ad tech, and most recently Power Platform consulting. He is a keen problem solver and has a passion for using technology to make businesses more efficient.

Related Posts

Comments

0 Comments

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃