我想在Powerpoint 2016中创建一个迷你游戏。在第一张幻灯片中,有6张不同的图片(英雄),并且要求用户选择英雄。如何将他们的选择(图片)转移到演示文稿的下一张幻灯片中?
答案 0 :(得分:0)
所以,我最终得到了这段代码。我知道这不是最优雅的,所以任何增强/建议都将受到欢迎!
子fillShape(形状为myShape)
Dim theAnswer As String
theAnswer = myShape.Name
Dim heroName As String
MsgBox "the name is " & theAnswer
If theAnswer = "Name1" Then
ActivePresentation.Slides(3).Shapes(8).Fill.UserPicture ("C:\path\Name1.png")
ElseIf theAnwer = "Name2" Then
ActivePresentation.Slides(3).Shapes(8).Fill.UserPicture ("C:\path\Name2.png")
ElseIf theAnwer = "Name3" Then
ActivePresentation.Slides(3).Shapes(8).Fill.UserPicture ("C:\path\Name3.png")
Else
MsgBox "something went wrong "
End If
ActivePresentation.SlideShowWindow.View.Next
结束子