5

How do I change the text within a textbox when an animation starts playing?

For the graduation of some of our students we are looking to make it so their photo appears in tune with their name on a single sheet.

  • What do you mean about "change the text within a textbox when an animation starts playing"? – WinniL Jun 19 '18 at 07:28
  • 1
    About the photo, you can insert the picture with their names, then set the animation for each photo. – WinniL Jun 19 '18 at 07:29
  • 1
    I was referring to something that happens often when programming, re-using a textbox but changing the text when a button/event happens (In this case a animation event) It's no longer really needed though ^-^ – Servicedesk-ictopleiding Jun 19 '18 at 07:33

1 Answers1

0

We can use a macro to change the text inside the presentation.

ActivePresentation.Slides(1).Shapes("Name Placeholder").TextFrame.TextRange = "John"

We can use multiple macros like the above and time it with the animations.

Dim time As Date
time = Now()

Dim count As Integer
time = DateAdd("s", 5, time) '5 refers to the seconds

Do Until time < Now()
DoEvents
If time < Now() Then

ActivePresentation.Slides(1).Shapes("Name Placeholder").TextFrame.TextRange = "John"

End If
Loop

Bhavesh Shaha
  • 125
  • 1
  • 7