Solved

Macro to Update a Placeholder in PowerPoint

Posted on 2014-11-05
4
344 Views
Last Modified: 2014-11-11
I want to have a Macro that will update a Text Box or Place Holder in my PowerPoint across Multiple Slides.

Basically I have a PowerPoint Presentation and have to manually change the Name of the Client on each slide where the Text Box is. I would like to have an Input Box pop up when I open the file and I would then just type in the Client Name and it would dynamical find all the "Client Name" Text Boxes/Placeholders and replace the contents of the Text Box/Placeholder with what ever I type in the Input Box.

I've named the Text Box the same thing "Client Name" to help with getting this done.

I have attached a sample Presentation with slides and notes on what I would like the Macro to do.
SlideExample.pptx
0
Comment
Question by:thomas-sherrouse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40425588
Hi,

pls try

Sub updateClientName()
strClientName = InputBox("Enter Client name")
If strClientName <> "" Then
    For Each Pg In Application.ActivePresentation.Slides
        For Each obj In Pg.Shapes
            If obj.HasTextFrame Then
                If obj.TextFrame2.TextRange.Text = "[CLIENT NAME]" Then
                    obj.TextFrame2.TextRange.Text = strClientName
                End If
            End If
        Next
    Next
End If
End Sub

Open in new window

Regards
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 40425643
You don't really need code to do this just the built in REPLACE command.
0
 

Author Comment

by:thomas-sherrouse
ID: 40427152
Rgonzo1971 - I used the code and the Input box works, but it doesn't update the "Client Name" box.
0
 
LVL 52

Expert Comment

by:Rgonzo1971
ID: 40427817
Hi,

Replace Client Name with [CLIENT NAME]

Regards
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This video teaches viewers how to add simple and professional themes to their slides.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question