Solved

Macro to Update a Placeholder in PowerPoint

Posted on 2014-11-05
4
308 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 50

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 50

Expert Comment

by:Rgonzo1971
ID: 40427817
Hi,

Replace Client Name with [CLIENT NAME]

Regards
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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