How to Embed a PowerPoint Slide Show in a Website as an iFrame
🔍 WiseChecker

How to Embed a PowerPoint Slide Show in a Website as an iFrame

You want to display a PowerPoint slide show directly on your website without forcing visitors to download the file. Embedding a presentation as an iFrame lets you show the slides inside a web page while keeping the original formatting, animations, and transitions. This article explains the two main methods to generate the embed code: using PowerPoint for the web (OneDrive) and using the public SlideShare platform. You will learn the exact steps to obtain the iFrame snippet and paste it into your site’s HTML.

Key Takeaways: Embedding a PowerPoint Slide Show as an iFrame

  • OneDrive > Share > Embed: Generates an iFrame code for any PowerPoint file stored in your OneDrive.
  • SlideShare > Upload > Embed: Creates an iFrame for public presentations with a fixed width and height.
  • HTML <iframe> tag attributes: You must set src, width, height, and frameborder for the embed to render correctly.

ADVERTISEMENT

Why Embedding a PowerPoint Presentation as an iFrame Works

An iFrame is an HTML element that loads another web page inside your current page. When you upload a PowerPoint file to OneDrive or SlideShare, the service converts the presentation into a web-based viewer. The embed code provided by these services is a ready-to-use iFrame tag that points to that viewer. Your visitors see the slides in their browser without needing PowerPoint installed. The presentation retains slide transitions, animations, and embedded media. The only requirement is that your website supports pasting raw HTML code into the page editor or template.

Method 1: Embed a PowerPoint Presentation From OneDrive

This method works for any PowerPoint file you have stored in your personal or work OneDrive. The file must be set to share with anyone who has the link, or at least with the intended audience. Follow these steps to get the iFrame code.

  1. Upload your presentation to OneDrive
    Sign in to onedrive.live.com. Click Upload > Files and select your .pptx file. Wait for the upload to finish.
  2. Open the file in PowerPoint for the web
    Right-click the uploaded file and choose Open > Open in PowerPoint for the web. The presentation opens in your browser.
  3. Click Share and then Embed
    In the top-right corner of the PowerPoint for the web toolbar, click Share. A panel opens. Click the Embed option. If you do not see Embed, click the three-dot menu and select Embed from the list.
  4. Set the embed dimensions
    In the Embed dialog, you can choose the width and height of the viewer. The default values are 640 pixels wide and 480 pixels tall. Adjust these numbers to match your website layout. You can also check or uncheck the option to start the slide show automatically when the page loads.
  5. Copy the iFrame code
    Click the Generate button or the Copy button. The embed code is copied to your clipboard. It looks like this: <iframe src="https://onedrive.live.com/embed?resid=..." width="640" height="480" frameborder="0" scrolling="no"></iframe>.
  6. Paste the code into your website HTML
    Open your website content management system or HTML editor. Navigate to the page where you want the presentation to appear. Switch to the HTML or Source view. Paste the iFrame code at the desired location. Save and publish the page.

ADVERTISEMENT

Method 2: Embed a PowerPoint Presentation From SlideShare

SlideShare is a free platform owned by LinkedIn that hosts presentations publicly. This method is suitable if you want a public embed without requiring viewers to sign in. The iFrame code from SlideShare includes a fixed width of 595 pixels and a height based on the aspect ratio of your slides.

  1. Sign up or sign in to SlideShare
    Go to slideshare.net. Create an account or sign in with your LinkedIn or email credentials.
  2. Upload your PowerPoint file
    Click the Upload button in the top-right corner. Select your .pptx or .ppt file. SlideShare converts the file to a web-based slide deck. This process may take a few minutes depending on the file size.
  3. Set the presentation privacy
    During upload, you can choose Public or Private. Only Public presentations generate an embed code. If you select Private, the embed option will not appear.
  4. Open the published presentation
    After the upload completes, click on the presentation title to open its viewer page. The URL in your browser is the public page for your slides.
  5. Click Share and copy the Embed code
    Below the slide viewer, click the Share button. A dialog appears with two tabs: Link and Embed. Click the Embed tab. Copy the iFrame code shown in the text box. The code looks like this: <iframe src="https://www.slideshare.net/slideshow/embed_code/key/..." width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen></iframe>.
  6. Paste the code into your website
    Go to your website editor. Switch to the HTML view of the target page. Paste the iFrame code. Save and publish. The presentation now displays inside your page.

Common Issues When Embedding a PowerPoint iFrame

The iFrame shows a blank box or an error message

This usually happens when the sharing permissions are not set correctly for a OneDrive file. Go back to the file in OneDrive, click Share, and change the link setting to Anyone with the link can view. For SlideShare, the presentation must be set to Public. If you changed the privacy after uploading, you need to delete and re-upload the file.

The slide show does not start automatically

In the OneDrive Embed dialog, there is a checkbox labeled Start slide show automatically. Make sure it is checked before you copy the code. For SlideShare, automatic start is not supported. You can add the parameter ?autoplay=1 to the end of the src URL in the iFrame code, but this does not work on all browsers.

The iFrame is too small or cuts off the slides

The embed code from both services uses fixed pixel dimensions. To make the iFrame responsive, wrap it in a container with a percentage width and use CSS to set the aspect ratio. Add this HTML around your iFrame: <div style="position:relative; padding-bottom:56.25%; height:0; overflow:hidden;"><iframe style="position:absolute; top:0; left:0; width:100%; height:100%;" src="..." frameborder="0"></iframe></div>. The 56.25% padding-bottom value matches a 16:9 aspect ratio. Adjust it if your slides use a different ratio.

Animations and transitions do not play inside the iFrame

The PowerPoint for the web viewer supports most animations and transitions, but some complex custom animations may not render. SlideShare converts slides to images and does not support animations at all. If animations are critical, use the OneDrive method and test the result on several browsers.

OneDrive Embed vs SlideShare Embed: Feature Comparison

Item OneDrive Embed SlideShare Embed
File source Your personal or work OneDrive SlideShare public library
Privacy control Anyone with the link or specific people Public only
Animations and transitions Supported (most) Not supported
Autoplay option Yes, via checkbox in embed dialog No
Default embed width 640 pixels 595 pixels
Requires viewer sign-in No No

You can now embed a PowerPoint slide show in your website using the iFrame code from OneDrive or SlideShare. Test the embed on a staging page first to confirm that the dimensions and permissions work as expected. For responsive layouts, wrap the iFrame in a container with the padding-bottom CSS technique. If you need to update the presentation later, simply replace the file in OneDrive or re-upload to SlideShare — the embed code URL remains the same.

ADVERTISEMENT