How to Embed a Microsoft OneDrive Document in a WordPress Post

How to Embed a Microsoft OneDrive Document in a WordPress Post



One of the most common applications that people use are the Microsoft Office applications that include Excel and Word. Happily, if you don’t have these applications, you can still obtain a free account in Outlook.com. Using Microsoft’s One Drive, you can open Microsoft Office documents and then get a link that you can use to share the document or embed in a website. For this tutorial, we will be embedding a Word document into a WordPress post. No plugins needed!

For this tutorial, I am using an outlook.com account to get the link that can be used to embed a Microsoft document into WordPress post. You’ll also need to have a file – Word, Excel, Powerpoint, etc. – that you can share and embed into your WordPress post. The first steps will be to obtain the embed code.

Log in to your Microsoft account. In creating this tutorial, we are using a Microsoft Outlook.com account.

Click on the OneDrive icon that leads to the application types (onedrive-docmenu.jpg)

Click on the application you wish to use. Create or load the document that you want to share. If you have a document that was created on the stand-alone Office application, you may need to upload it into OneDrive before you can open it in the online application of your choice.

In the menu along the top of the screen, click on FILE

Next, in the menu column in the left-hand side click on SHARE

Click on SHARE. You will see the option to Share with People or Embed.

Click on Embed.

After you click on Embed, you will see a preview of the document. You can adjust the size of the image with the fields of the image size to the right.

If you’re satisfied with the image, click on Embed Code at the bottom of the page. This provides you the HTML code to embed the document in an iFrame. Copy the code. The code will be selected by default (as long as you didn’t click anywhere on the page). You can use your CTRL+C keys (command key + C on a Mac) to copy the code, or you can use your mouse. To use your mouse, right-click on the selected code, then select COPY from the menu that appears. On a Mac with the touchpad, you can hold your CTRL key and click on the selected code to get the pop-up menu where you can select copy.

The next part will require that you log in to your WordPress account.

Login to the WordPress Administrator
Click on Posts or Pages
Add a new Post or Page, or edit an existing post or page
In the visual tab of the editor, paste the Embed code for the Microsoft Document

Click on Save Draft or Publish.

You can then either Preview the document or view it live on your site if you have published it.

InMotion Hosting was founded in 2001 and provides personal and business web hosting for everyone! For more information about InMotion Hosting and the services we provide see here:

9 thoughts on “How to Embed a Microsoft OneDrive Document in a WordPress Post

  1. Hello,
    I have tried this method and I am able to embed excel sheet. But there is tab in the bottom of embedded sheet which has option of view full size workbook, by clicking on it anybody can open and save that workbook to his PC. How can I remove this tab. Please help

  2. HI There, I have listened to your One Drive document embed to worpress video. Very good , thanks , although i would like to know if you could explain if there is an option to add a link directly in wordpress which will open the file saved in one of my OneDrive folders ?. Thanking you in advance for your advice. Kind Regards . martin Argimon ( South africa)

  3. The code being generated for me is just a simple url, not the <iframe. ….> version. I am having trouble viewing the spreadsheet in OneDrive. Maybe related. Any ideas?

  4. Ive implemented an excel-calculation-sheet on wordpress via onedrive. unfortunately whenever somebody else enters the website he needs to log-on to his onedrive account in order to see the excel-sheet. Is there a possibility to implement the excel-sheet so that everyone can access it without using onedrive?
    Tahnk you very much in advance!

  5. Hello, is there anyway like this to embed a pdf file from one drive? I tried this instructions, but with pdf there is no "embed" option, or at least I could not find it. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *