Forum Discussion
Embedding PPT requires Sharepoint login
Found it! You should find that this code works:
<iframe src="https://kresslawoffice-my.sharepoint.com/:p:/g/personal/matt_kress_kresslawoffice_onmicrosoft_com/EbWmgkYAEcxKj424PzMAuUoBoYfnOONmK8caQvndDp1OEQ?e=pJkc0v&action=embedview&wdAr=1.7777777777777777" width="350px" height="221px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> presentation, powered by <a target="_blank" href="https://office.com/webapps">Office Online</a>.</iframe>
***TechCommunity is shortening URLs, which breaks the HTML. See attached .docx file for full reference.
I suspect we had two issues here:
- First, the embed code is using the unaltered document URL, which does not allow anonymous access. When an anonymous access link is created, the URL is more of a "pathway" than a destination, so even if you've shared a document anonymously before, that specific link must be used for an anonymous user to get to the document at all. The embed code must use this anonymous access URL, or your users would be asked to authenticate.
- Second, inserting the anonymous access URL (like the one you provided in your last post) in the embed code requires a bit knowledge of SharePoint special sauce. If you simply paste over the entire document URL generated by Office365 when you asked it for embed code, you'll likely overwrite that "&action=embedview" bit. If that happens, your iFrame will be empty, so be sure you're preserving that piece when you replace the URL used in the iFrame code.
Thanks Matt, I'll give that a try.
- ErsoymatMar 11, 2020Copper Contributor
yes Matt, did you find a solution?
- swift-mattApr 22, 2020Copper Contributor
I was able to get this to work using what Matt Coats shared.
Using the embed code from PowerPoint you will need to replace the bolded link I have below. You replace it with a public link. To get the public link In PowerPoint online go to "Share", select "Share with people" and select "Copy Link". In the text file, I attached it shows where the public link goes. Only replace the link before the "&action=embedview".
<iframe src="https://kresslawoffice-my.sharepoint.com/:p:/g/personal/matt_kress_kresslawoffice_onmicrosoft_com/EbWmgkYAEcxKj424PzMAuUoBoYfnOONmK8caQvndDp1OEQ?e=pJkc0v&action=embedview&wdAr=1.7777777777777777" width="350px" height="221px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> presentation, powered by <a target="_blank" href="https://office.com/webapps">Office Online</a>.</iframe>
- btchristophJan 13, 2021Copper Contributor
This solution worked for me, using the full code in the attachment and replacing the URL with my own document shared URL.
- cassie131Oct 24, 2019Copper Contributor
Matthew Kress curious if you found a solution for embedding PPTs so you can view them without logging in?