3 Ways To Embed A PDF Document In Microsoft Excel
Có thể bạn quan tâm
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.
- Go to the Insert tab in the ribbon.
- Click on the Object command found in the Text section.
This will open the Object menu.
- Go to the Create from File tab in the Object menu.
- Click on the Browse button and then choose the PDF file to insert from the file picker menu.
- Check the Link to file option if you want any future changes made to the source document to be reflected in the embedded file.
- 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.
- 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.
- Right click on the PDF icon.
- Select Acrobat Document Object from the options.
- Select Convert from the submenu options.
This will open the Convert menu.
- Press the Change Icon button.
This will open the Change Icon menu.
- Press the Browse button and this will allow you to select a new icon.
- Enter your new title into the Caption input.
- Press the OK button in the Change Icon menu.
- 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 SubThis 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!
Từ khóa » Excel Nhúng
-
Nhúng Một Sổ Làm Việc Excel Trên Trang Web Hoặc Blog Từ OneDrive ...
-
Nối Kết Hoặc Nhúng Dữ Liệu Excel Vào Dự án - Microsoft Support
-
Cách Nhúng Bảng Tính Excel Vào Website
-
Cách Nhúng Một Trang Tính Excel Vào Trang Web Của Bạn
-
Chèn, Nhúng Dữ Liệu Vào Excel
-
Nhúng Bảng Tính Excel Vào Website | Tủ Sách Vàng - YouTube
-
Cách Nhúng Bảng Tính Excel Vào Website - YouTube
-
Di Chuyển Trang Tính Excel Trực Tuyến, Chia Sẻ, Nhúng Mã Trên Trang ...
-
Embed Excel Into The Request Form - Zendesk Help
-
How To Embed Excel (or Google Sheets) Tables Into HTML
-
Embed An Excel Chart In Powerpoint - CustomGuide
-
Embed Excel Sheet In HTML - Lei Mao's Log Book
-
How To Embed An Excel Flowchart In Microsoft Word - BreezeTree
-
Insert Excel Into A Word Document - The Training Lady