This article explains how to create a PowerPoint macro to resize photos so that all images are the same size and in the same position on the slide. Instructions apply to PowerPoint 2019, 2016, 2013, and PowerPoint for Microsoft 365.

What to Know

  • Go to View > Macros, enter a name for the macro and select Create, then enter the code for the macro.Save the macro as a PowerPoint Macro-Enabled Presentation.To apply the macro, go to View > Macros, choose the macro you made, and then select Run.

Add the Images to PowerPoint Slides

If you have a large number of images to include in PowerPoint, speed up the process of resizing them without repeating the tedious task for each picture by creating a macro to do the job for you.

Before you begin, insert all the images you want to use in the PowerPoint presentation.

  • Open a PowerPoint presentation and select the first slide that will hold an image.
  • Go to Insert.
  • Select Pictures > Picture From File.
  • Choose an image on your computer and select Insert.
  • Repeat this process to add photos to the other slides in your presentation.
  • Do not be concerned that the photos are too large or too small for the slides at this point. The macro will take care of resizing images so they are the same size.

Record a Macro to Resize the Images

After all the images have been inserted in your PowerPoint presentation, create a macro to reduce all the images to the same size and position on the slide. Before you create the macro to automate the task, you may want to practice the steps on a single image to make sure you get the exact results you want.

Open a PowerPoint presentation and select the first slide that will hold an image.

Go to Insert. 

Select Pictures > Picture From File.

Choose an image on your computer and select Insert.

Repeat this process to add photos to the other slides in your presentation.

Do not be concerned that the photos are too large or too small for the slides at this point. The macro will take care of resizing images so they are the same size.

  • Go to View and select Macros.
  • In the Macro dialog box, enter a Macro name.
  • The name can contain letters and numbers, but must begin with a letter and cannot contain any spaces. Use the underscore to indicate a space in the macro name.
  • The Macro in list displays the name of the presentation you’re working on.
  • A macro can be applied to several presentations. Open the other presentations and select All open presentations.
  • Select Create to open Microsoft Visual Basic for Applications.
  • Enter the following information but replace the numbers after the equal sign with your own desired image size and placement. Enter numbers in points. For example:
  • sub ResizePhotos ()With ActiveWindow.Selection.ShapeRange.Height = 418.3.Width = 619.9.Left = 45.Top = 45End WithEnd Sub
  • Select Save to open Save As dialog box.
  • In the Save as type list, choose PowerPoint Macro-Enabled Presentation.
  • Select Save.
  • Close Visual Basic for Applications.

Apply the Macro to Resize Images in Your Presentation

  • Select an image you want to resize.
  • Go to View and select Macros.
  • Choose the macro you just made and select Run.
  • Your image is resized and moved. Continue to apply the macro to the other images in your presentation.

Go to View and select Macros.

In the Macro dialog box, enter a Macro name.

The name can contain letters and numbers, but must begin with a letter and cannot contain any spaces. Use the underscore to indicate a space in the macro name.

The Macro in list displays the name of the presentation you’re working on.

A macro can be applied to several presentations. Open the other presentations and select All open presentations.

Select Create to open Microsoft Visual Basic for Applications.

Enter the following information but replace the numbers after the equal sign with your own desired image size and placement. Enter numbers in points. For example:

sub ResizePhotos ()With ActiveWindow.Selection.ShapeRange.Height = 418.3.Width = 619.9.Left = 45.Top = 45End WithEnd Sub

Select Save to open Save As dialog box.

In the Save as type list, choose PowerPoint Macro-Enabled Presentation.

Select Save.

Close Visual Basic for Applications.

Select an image you want to resize.

Choose the macro you just made and select Run.

Your image is resized and moved. Continue to apply the macro to the other images in your presentation.

Get the Latest Tech News Delivered Every Day