logo
search
VBA & Macro Problems

How to Create or Update a PowerPoint Custom Slide Show Using VBA

Jason MillerJason Miller Oct 19, 2026 868 views

Question details

The user wants to automate the creation or updating of custom slide sequences using VBA from a comma-separated list of slide numbers.

How to Create or Update a PowerPoint Custom Slide Show Using VBA
Product
PowerPoint
Device & OS
not provided
Scenario
Managing multiple training sessions from one large master presentation by building different slide sequences dynamically.
Observed behavior
A need to read a string of slide numbers via VBA, convert them to slide references, and generate a custom show without duplicating the presentation.
Before you start

Ensure you have saved your presentation as a Macro-Enabled Presentation (.pptm) and that the Developer tab is enabled in your PowerPoint ribbon.

Solution 1Recommended

Create a Custom Slide Show Using a VBA Macro

Use a VBA macro to read a comma-separated list of slide IDs and automatically build a named custom show.

This approach is highly efficient for corporate trainers or educators who maintain a massive master deck but need customized versions for different audiences. By parsing a string like '1,4,10,33,14,23', the VBA script instructs the presentation to construct a named Custom Slide Show sequence automatically without requiring manual dragging and dropping.

1
Open the VBA Editor

Launch your PowerPoint presentation and press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor.

2
Insert a New Module

In the VBA editor, click on 'Insert' in the top menu bar, then select 'Module' to create a new blank script window.

3
Write the Parsing and Creation Script

Write your macro code utilizing the 'NamedSlideShows.Add' method. Use the 'Split' function to parse your comma-separated string of slide numbers into an array, then loop through this array to fetch the corresponding slide references and add them to your custom show.

4
Execute the Macro

Press F5 while inside the VBA editor, or return to the PowerPoint window, go to the 'Developer' tab, click 'Macros', select your new macro, and click 'Run'.

5
Verify the Custom Show

Navigate to 'Slide Show' > 'Custom Slide Show' > 'Custom Shows...' on the ribbon to verify that your newly generated presentation sequence appears in the list.

Create a Custom Slide Show Using a VBA Macro
Community VBA Scripts: If you are managing complex custom shows or need error-handling for missing slides, consider searching VBA repositories like the RDPSlides PowerPoint FAQ for robust, ready-to-use parsing scripts.
Manage Slide Sequences Effortlessly

Create Custom Slide Shows Easily in WPS Presentation

Instead of relying on complex VBA scripts, you can easily build and manage custom slide sequences directly using WPS Presentation's intuitive graphical interface. It's the perfect solution for trainers managing a single master deck without writing any code.

  1. 1. Open Your Master Presentation: Launch WPS Presentation and open the master file containing all your slides.
  2. 2. Access Custom Slide Shows: Navigate to the 'Slide Show' tab on the top ribbon menu.
  3. 3. Open the Custom Shows Dialog: Click on 'Custom Slide Shows' and select 'Custom Shows...' from the drop-down menu.
  4. 4. Create a New Sequence: Click the 'New' button, name your custom show (e.g., 'Morning Training'), and simply check the boxes for the specific slides you want to include.
  5. 5. Save and Present: Click 'Add' and then 'OK' to save. You can now present this customized training sequence instantly from the same master file.
Native support for Custom Slide Shows without needing macro setupFully compatible with Microsoft PowerPoint (.pptx) file formatsLightweight, fast, and completely free to use for daily presentation tasks
microsoft office alternative - wps office

Frequently Asked Questions

What is a custom slide show in presentation software?

A custom slide show is a feature that allows you to create different, tailored presentation sequences from a single master presentation file by selecting and ordering a specific subset of slides.

Can I update an existing custom slide show using VBA?

Yes. Your VBA script can check if a custom slide show with a specific name already exists in the NamedSlideShows collection. If it does, you can delete and recreate it, or modify its slide array to seamlessly update the sequence.

Why would I use VBA instead of the standard menu to create custom shows?

Using VBA is highly efficient if you have to manage dozens of customized sequences across multiple departments, or if your required slide sequences are generated automatically from an external database or a comma-separated list.

Will creating custom slide shows reduce my presentation file size?

No, creating a custom slide show within a master file does not reduce the file size of that document. However, it prevents file size bloat on your hard drive because you do not need to save multiple duplicate copies of the entire presentation for different audiences.