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.
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.
This will open the Object menu.
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.
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.
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.
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.
This will open the Convert menu.
This will open the Change Icon menu.
Your embedded PDF document will get the updated icon and title.
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.
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!
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.
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!
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.
Subscribe for awesome Microsoft Excel videos 😃
👉 Find out more about our Advanced Formulas course!