Powerpoint 2010 VBA:不要对带有特定标题的幻灯片进行编号
Powerpoint 2010 VBA: Don't number slides with certain title
我最近写了一个宏,它不会对隐藏的幻灯片进行编号。也就是说,当幻灯片被隐藏时,它不会被计入整个幻灯片的编号,所以如果幻灯片 3 被隐藏,编号将是:
幻灯片 1,第 1 号
幻灯片 2,编号 2
幻灯片 3,(无编号)
幻灯片 4,编号 3
有没有办法对所有标题为 "Agenda" 的幻灯片执行完全相同的操作?我希望我的幻灯片以幻灯片放映模式显示,但我不希望它们计入幻灯片编号。
基本上,有没有办法在 if 语句中引用幻灯片标题文本?
谢谢!
如果在包含 case-insensitive 文本的给定幻灯片上找到标题占位符,这将 return 为真 "agenda":
' ===========================================================================
' Purpose : Determine if a given slide has an Agenda-based title placeholder
' Written By : Jamie Garroch of YOUpresent.co.uk
' Inputs : oSld - the slide object to be examined
' Outputs : Returns true if the word "agenda" is found in a title placeholder
' Example Call : bAgendaSlide = IsSlideAgenda(ActiveWindow.View.Slide)
' Notes : Search is case insensitive
' ===========================================================================
Function IsSlideAgenda(oSld As Slide) As Boolean
With oSld.Shapes
If .HasTitle Then
If Trim(UCase(.Title.TextFrame.TextRange.text)) Like "*AGENDA*" Then IsSlideAgenda = True
End If
End With
End Function
我最近写了一个宏,它不会对隐藏的幻灯片进行编号。也就是说,当幻灯片被隐藏时,它不会被计入整个幻灯片的编号,所以如果幻灯片 3 被隐藏,编号将是:
幻灯片 1,第 1 号 幻灯片 2,编号 2 幻灯片 3,(无编号) 幻灯片 4,编号 3
有没有办法对所有标题为 "Agenda" 的幻灯片执行完全相同的操作?我希望我的幻灯片以幻灯片放映模式显示,但我不希望它们计入幻灯片编号。
基本上,有没有办法在 if 语句中引用幻灯片标题文本?
谢谢!
如果在包含 case-insensitive 文本的给定幻灯片上找到标题占位符,这将 return 为真 "agenda":
' ===========================================================================
' Purpose : Determine if a given slide has an Agenda-based title placeholder
' Written By : Jamie Garroch of YOUpresent.co.uk
' Inputs : oSld - the slide object to be examined
' Outputs : Returns true if the word "agenda" is found in a title placeholder
' Example Call : bAgendaSlide = IsSlideAgenda(ActiveWindow.View.Slide)
' Notes : Search is case insensitive
' ===========================================================================
Function IsSlideAgenda(oSld As Slide) As Boolean
With oSld.Shapes
If .HasTitle Then
If Trim(UCase(.Title.TextFrame.TextRange.text)) Like "*AGENDA*" Then IsSlideAgenda = True
End If
End With
End Function