How to Resize Photos in PowerPoint Using a Macro

PowerPoint can be difficult to use if you want to include a lot of images. However, resizing these images makes them easier to manage, which can be done using a macro.

When you plan to upload your images to a presentation, you need them to look balanced and organized. Also, it makes a difference when it comes to the file size of your PowerPoint presentation. Downloading almost 15 images without resizing them will result in a larger PowerPoint presentation than if you had resized.

What is VBA?

VBA stands for Visual Basic for Applications and is a programming language that works in Microsoft Office processes and applications. You can extend and automate PowerPoint using VBA in PowerPoint, which offers two main options:

PowerPoint extension: When it comes to a task that requires the use of a PowerPoint extension feature to be completed, the use of VBA code allows these PowerPoint extensions to actually run.

PowerPoint Automation: It allows you to avoid repeating a task multiple times by allowing you to record a particular process and then run it on multiple slides. It saves you time and effort.

The basics and functions of the macro

A macro is a guidance tool or template that orients functions and their performance. They are used to automate tasks, for example in PowerPoint, where their application allows the software to require less repetition in its function.

You can use macros for several purposes, such as: Sequencing keystrokes in Word, PowerPoint, Excel, and assembly language. PowerPoint 2013, 2016, 2019, as well as Microsoft 365 PowerPoint support this feature.

What can you do with a macro?

  • Macro is capable of enhancing any task that can be done manually with a mouse or keyboard.

  • It is easier and more efficient to perform repetitive tasks because you can repeat operations over and over without going through the initial hassle.

  • Allows a similar task to be performed on different objects and presentations.

  • They are generally used to manipulate operations and format objects.

  • It can be manipulated to improve the proficiency of your PowerPoint operations.

In order for you to be able to use VBA to automate PowerPoint processes, you will need to click the Developer tab in the menu ribbon. This allows your Visual Basic Editor to configure your macro so that it is ready to use.

Activating the Developer tab

Here are the steps to add the Developer tab to the menu ribbon of your PowerPoint presentation:

  1. Open PowerPoint and in the upper right corner of the PowerPoint toolbar, click File> Options.

    File options drop-down list

  2. Once you click Options, a pop-up window will appear with a list of commands. Find Customize the ribbon and click on it to open another menu on the right side.

  3. To select Main tabs.

        Main tab in the Customize ribbon in PowerPoint

  4. In the drop-down menu, find and click the box next to Developer.

    Developer Checkbox on the Hands tab in PowerPoint

  5. To select Okay. The PowerPoint ribbon will add a Developer option to its list.

  6. You can now use the Developer box to create a macro in the next step.

    Developer tab added in main options window in PowerPoint

Create a macro for your PowerPoint presentation

Once you have the Developer tab, you can proceed to create a macro. To do this, follow the following steps:

  1. Click on the Developer Menu that now appears on your PowerPoint ribbon, and then select Macro to display the dialog entry for the macro.

  2. Choose a name to type in the name box to describe the action you want for the macro. For example, since you want to resize your slides, you can use Resize PowerPoint slide.

    Macro Naming Dialog

  3. When you insert a name for the macro in the dialog box, make sure that there is no space in the name that you provide. You can use an underscore where space is needed. The title will be displayed on the macro you are working on.

  4. Click on To create and open Visual Basic Editor.

    Visual Basic window open

  5. Now you can enter your VBA code to perform the action you selected.

  6. Replace the following entry with the size you want for your images. For example, the information displayed will look like this:

    A sample Visual Basic code for resizing pictures

Recording the macro for use

The next request will save your information.

  1. Click on the Save as from the list and select PowerPoint presentation supporting macros.

    Save as PowerPoint dialog box

  2. Click on to safeguard and close the window on Visual Basic Editor.

Apply the macro in your PowerPoint presentation for image resizing

Select a few images that you want to resize by doing the following:

  1. From the top bar menu, select Insert, then click Photo and choose an image from your file.

    Animal images saved to a PC

  2. Repeat the action; add more images to your slide until you are done. The size of the images may vary from large to small at this point, but you shouldn’t be worried about that as they will all be resized to equal sizes by the macro.

  3. Once you have chosen an image to resize, click Seen on the top ribbon and select Macro.

  4. Click on the macro you recorded and press To run.

    PowerPoint Macro Run Dialog

Your photos will be resized instantly. Continue to apply the macro to the other images in your presentation.

Understand the effectiveness of using macro in PowerPoint to resize pictures

To create a uniform and cohesive look in your presentation, you need to resize your images. It is the fastest and easiest way to accomplish such small tasks with PowerPoint macros. You just need to create the macro, save it, and apply it to your presentation.

Macro is the best tool to automate repetitive tasks for improved efficiency and productivity. You can avoid repetitive extension processes by recording an action that can be repeated to achieve the same results. It will save you a lot of time.


Every Microsoft PowerPoint for Windows keyboard shortcut you should know

Become a Microsoft PowerPoint master with this free downloadable PDF of all the best keyboard shortcuts.

Read more

About the Author