How To: Publicly Embed OneDrive For Business Documents

I get asked a bunch of questions around Office365 and Windows 10 and eventually I decide it’s probably worth explaining the “how to” answer in a blog post. One that has popped up consistently over the last year from time to time is:

How do I embed a Word, PowerPoint or Excel document that I have stored in OneDrive For Business or SharePoint into my blog / Learning Management / Intranet?

It’s a great question, because ideally we want to be able to work off a single document, stored in the cloud, that we can share publicly in a website context such as a blog or intranet, without needing to have duplicates of the file floating around. Because of security concerns, this is not a straight forward exercise in OneDrive For Business or SharePoint because, rightfully, many businesses want to restrict what is shared externally.

Interestingly, and somewhat frustratingly, it’s super easy to embed documents for anonymous viewing using the consumer service e.g.


With, you can see it generates anonymous/publicly accessibly embed code with a single click, helpfully giving dimension settings as a configurable option.

The process to achieve the same outcome in OneDrive For Business is slightly more complex, but it can be done and this is a good guide demonstrating how to achieve this using Excel Online as the example. For those desperate for a visual explanation, I’ve made a screencast showing how this can be done in just a couple of minutes:

If you want the step by step, then it’s basically:

  • Go to your document hosted in OneDrive for Business and click the “share” button in the top right hand corner. When the “Share” box opens you need to ensure that the document is set to “Anyone with the link and view and edit” – you can turn off editing if you wish by expanding this drop-down menu. Then click “Copy Link”


  • If your settings are correct you should get the green tick once you have hit copy:


  • The above PowerPoint had some additional HTML wrapped around it to control the size of the iFrame as well e.g. width=”560″ height=”290″
  • You can test your code at a website like this one by pasting the link you copied – don’t forget to include the “&action=embedview:


Below is the same Word Online document embedded into this blog post:

If you’re really keen to get stuck in with this, then do check out this link again which provides you with additional variables you can include e.g. ability to interact with an embedded Excel document,


  1. Crispin Lockwood November 2, 2017
  2. Dona November 14, 2017
  3. DrD February 13, 2018
  4. David Regis September 14, 2018
  5. Mike B November 24, 2018
  6. Jerz January 8, 2019
  7. Anjali April 7, 2020
    • johnhuangtesting April 28, 2020
      • Sam McNeill April 28, 2020
  8. Michael Dyer June 5, 2020
  9. jam00782 November 25, 2021

Leave a Reply to johnhuangtestingCancel reply