如何更改动画文本框中的 Powerpoint 文本

Ser*_*ing 5 microsoft-powerpoint windows-10 microsoft-powerpoint-2016

当动画开始播放时,如何更改文本框中的文本?

对于一些学生的毕业典礼,我们希望让他们的照片与他们的名字一致地出现在一张纸上。

小智 0

我们可以使用宏来更改演示文稿中的文本。

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

我们可以使用像上面这样的多个宏,并用动画来计时。

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

Run Code Online (Sandbox Code Playgroud)