Others

How to Copy a Text Box to Every PowerPoint Slide with VBA

Emma BrownEmma Brown Nov 3, 2026 869 views

Question details

The user needs to insert or copy a specific text box across all slides in a presentation using a VBA macro, bypassing the standard Slide Master feature.

How to Copy a Text Box to Every PowerPoint Slide with VBA
Product
Microsoft PowerPoint
Device & OS
not provided
Scenario
Automating repetitive presentation design tasks where a standardized text box needs to appear on every slide using custom scripts.
Observed behavior
The user wants to successfully execute a VBA macro that loops through all slides and pastes a text box, treating the text box correctly as a shape object.
Before you start

Ensure that the Developer tab is enabled in your presentation software ribbon and that your presentation is saved as a Macro-Enabled Presentation (.pptm) to retain your VBA scripts.

Solution 1Recommended

Use a VBA Macro to Loop and Add Text Boxes

Use a VBA script that iterates through every slide and adds a text box shape, leveraging the fact that VBA processes text boxes as standard shapes.

In PowerPoint VBA, text boxes are technically classified as 'Shapes' (specifically msoTextBox). Therefore, a macro designed to loop through slides and add a shape can perfectly process text boxes, provided you target the correct properties and dimensions.

1
Open the VBA Editor

Open your presentation and press 'Alt + F11' on your keyboard to launch the Microsoft Visual Basic for Applications editor.

2
Insert a New Module

Click on 'Insert' in the top menu and select 'Module' to create a blank workspace for your macro.

3
Enter the Loop Code

Write a script utilizing the 'For Each sld In ActivePresentation.Slides' loop, embedding the 'sld.Shapes.AddTextbox' command with your desired coordinates and text string.

4
Run the Macro

Press 'F5' or click the green 'Run' button. The macro will immediately process every slide and insert the specified text box.

Shape Property Compatibility: Because VBA treats text boxes exactly like shape objects, you can seamlessly apply standard shape-handling code such as positioning, background color, and borders to your text boxes.
Automate Presentations with WPS

Effortlessly Apply Global Slide Edits in WPS Presentation

WPS Presentation provides seamless compatibility with Microsoft PowerPoint files (.pptx) and offers an incredibly intuitive Slide Master feature, allowing you to add standard text boxes to every slide instantly without needing complex VBA code.

  1. 1. Open WPS Presentation: Download and launch WPS Office, then open your existing presentation file.
  2. 2. Access the Slide Master: Navigate to the 'Design' or 'View' tab on the top ribbon and click on 'Slide Master'.
  3. 3. Insert the Text Box: Select the top-level master slide on the left pane, go to 'Insert', and draw your text box. Type your desired text.
  4. 4. Apply to All Slides: Click 'Close Master View'. The text box will now automatically appear perfectly positioned on every slide in your presentation.
Fully compatible with Microsoft PowerPoint (.ppt, .pptx) formats and structures.Easily apply universal text box placement and formatting across all slides.Lightweight, fast-loading software with a highly familiar user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't my standard shape-copying macro work for text boxes?

Text boxes are a specific type of shape (msoTextBox) in VBA. If your macro filters strictly for AutoShapes or pictures, it might skip text boxes. Ensure your script explicitly references text frame properties, such as 'TextFrame.TextRange', to manipulate the text properly.

Can I add a text box to every slide without using VBA macros?

Yes. The most efficient non-coding method is using the Slide Master. Navigate to View > Slide Master, select the primary master slide at the top of the thumbnail list, and insert your text box. It will automatically populate across all dependent slides.

Will my VBA macro run automatically when I open the presentation?

No, VBA macros generally require manual execution or must be tied to specific presentation events. Additionally, to keep the macro functioning, you must save the file in the Macro-Enabled Presentation (.pptm) format.