Insert Multiple JPEG Files as Full-Slide Images in PowerPoint
Question details
Create a PowerPoint presentation from a folder of JPEG files, placing one image on each slide and stretching it to fill the slide.

- Product
- Microsoft PowerPoint
- Device & OS
- not provided
- Scenario
- A user wants to batch-insert many JPEG files into a presentation without margins around the images.
- Observed behavior
- The desired result is one JPEG per slide, stretched to cover the entire slide, even if its proportions differ from the slide.
Put the JPEG files in one folder and set the presentation's slide dimensions under Design > Slide Size before importing. Stretching images to fill the slide may distort them when their aspect ratios differ from the slide's.
Use a VBA macro to stretch each JPEG across a slide
Use this method in desktop PowerPoint on Windows to append one full-slide image per JPEG file, including in large batches.
The macro adds blank slides to the end of the active presentation and places one JPG or JPEG file on each. File order is not guaranteed, so check the slide sequence afterward.
Open the destination presentation in desktop PowerPoint on Windows, then press Alt+F11. In the VBA editor, select Insert > Module.
Paste this code into the module: Sub InsertJPEGsFullSlide() Dim folder As String, fileName As String, ext As Variant Dim sld As Slide, w As Single, h As Single With Application.FileDialog(msoFileDialogFolderPicker) .Title = "Select the JPEG folder" If .Show <> -1 Then Exit Sub folder = .SelectedItems(1) End With w = ActivePresentation.PageSetup.SlideWidth h = ActivePresentation.PageSetup.SlideHeight For Each ext In Array("*.jpg", "*.jpeg") fileName = Dir(folder & "\" & ext) Do While fileName <> "" Set sld = ActivePresentation.Slides.Add(ActivePresentation.Slides.Count + 1, ppLayoutBlank) sld.Shapes.AddPicture folder & "\" & fileName, msoFalse, msoTrue, 0, 0, w, h fileName = Dir() Loop Next ext End Sub
Return to PowerPoint, select View > Macros, choose InsertJPEGsFullSlide, and select Run. Choose the JPEG folder in the folder picker.
Review the added slides and their order in Slide Sorter. Use File > Save As and choose PowerPoint Macro-Enabled Presentation (.pptm) if you want to keep the macro in the file.
Create slides from JPEGs with PowerPoint Photo Album
Use Photo Album for a simpler import when preserving image proportions is more important than eliminating every margin.
Edit image-based presentations with WPS Presentation
WPS Office is a free, lightweight alternative with a familiar presentation interface. Open compatible PowerPoint files and add or resize images on slides as you migrate your work; it does not fix PowerPoint add-in or macro problems.

Frequently Asked Questions
Why do my images have margins in PowerPoint Photo Album?
Photo Album can fit an image while preserving its proportions. If the image and slide have different aspect ratios, margins may remain. The VBA solution sets each picture to the slide's full width and height instead.
Will stretching a JPEG to fill a slide distort it?
It can. If the JPEG and slide have different aspect ratios, setting both the image width and height to the slide dimensions changes the image's proportions. Set the slide size under Design > Slide Size before importing.
Does the VBA macro replace my existing slides?
No. It adds blank slides at the end of the active presentation, with one JPEG on each new slide. Review the slide order after running it.
How can I keep the macro in my presentation?
Select File > Save As and choose PowerPoint Macro-Enabled Presentation (.pptm). A regular .pptx file can contain the imported slides but cannot retain the VBA macro.




