PowerPoint动态时钟的VBA代码
我想在PowerPoint中创建一个动态时钟,并将其显示在所有幻灯片的相同位置。下面是我一直致力于创建动态时钟的代码 与其说“直到1<0为止”,我可能想要类似于“直到PowerPoint退出幻灯片放映模式为止”的东西,但我不确定如何做到这一点 我尝试在PowerPoint幻灯片母版中创建一个形状,但不确定如何在代码的Shapes()部分中定义该形状。我只能够让时钟在形状(1)和形状(2)中运行,即幻灯片中的默认文本框PowerPoint动态时钟的VBA代码,vba,powerpoint,real-time-clock,Vba,Powerpoint,Real Time Clock,我想在PowerPoint中创建一个动态时钟,并将其显示在所有幻灯片的相同位置。下面是我一直致力于创建动态时钟的代码 与其说“直到1
Sub OnSlideShowPageChange()
Dim time As Date
Dim count As Integer
time = Now()
Do Until 1 < 0
DoEvents
With
ActivePresentation.Slides(SlideShowWindows(1).View.CurrentShowPosition).Shapes(1).TextFrame.TextRange
.Text = Format((Now()), "hh:mm:ss")
End With
Loop
End Sub
Sub-OnSlideShowPageChange()
暗时间为日期
将计数设置为整数
时间=现在()
直到1<0为止
多芬特
具有
ActivePresentation.Slides(SlideShowWindows(1.View.CurrentShowPosition).Shapes(1.TextFrame.TextRange)
.Text=格式((Now()),“hh:mm:ss”)
以
环
端接头