TPE
Tavvafi@gmail.com |
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Sub FlagSlides() Dim oSlides As Slides Dim oSld As Slide Set oSlides = ActivePresentation.Slides For Each oSld In oSlides If oSld.SlideShowTransition.Hidden Then ' Add a flag shape With oSld.Shapes.AddShape(msoShapeRectangle, 564#, 0#, 156#, 78#) ' give it a name so we can delete or hide it easily later .Name = "HIDDEN" ' Change this to whatever you like With .TextFrame.TextRange .Text = "HIDDEN SLIDE" With .Font '.Name = "Times New Roman" .Size = 14 .Bold = msoTrue .Color.RGB = RGB(255, 255, 255) End With End With ' text frame .Fill.ForeColor.RGB = RGB(255, 0, 0) End With ' newly added shape Else ' it's NOT hidden so ' Add a flag shape With oSld.Shapes.AddShape(msoShapeRectangle, 564#, 0#, 156#, 78#) ' give it a name so we can delete or hide it easily later .Name = "NOT_HIDDEN" ' Change this to whatever you like With .TextFrame.TextRange .Text = "NOT HIDDEN SLIDE" With .Font '.Name = "Times New Roman" .Size = 14 .Bold = msoFalse .Color.RGB = RGB(255, 255, 255) End With End With ' text frame .Fill.ForeColor.RGB = RGB(0, 0, 255) .Fill.Visible = msoTrue .Fill.Solid End With ' newly added shape End If Next oSld End Sub Sub UNFlagSlides() Dim oSlides As Slides Dim oSld As Slide Set oSlides = ActivePresentation.Slides On Error Resume Next ' in case user has deleted the "flag" shapes For Each oSld In oSlides If oSld.SlideShowTransition.Hidden Then oSld.Shapes("HIDDEN").Delete Else ' it's NOT hidden so oSld.Shapes("NOT_HIDDEN").Delete End If Next oSld End Sub