TPE
Tavvafi@gmail.com |
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Sub Peekaboo(oSh As Shape) ' Hides/makes visible the shape's text With oSh.TextFrame.TextRange ' If it has text ... If Len(.Text) > 0 Then ' Store the text in a tag so we can retrieve it later oSh.Tags.Add "PeekabooText", .Text ' Now blank the text .Text = "" Else .Text = oSh.Tags("PeekabooText") End If End With ' Update: added this line to make it work in PPT 2007 ' Leaving it in should not affect earlier versions of PPT SlideShowWindows(1).View.GotoSlide (oSh.Parent.SlideIndex) End Sub Sub ResetPeekaboos() ' Resets the shapes with peekaboo text to make the text invisible Dim oSh As Shape Dim oSl As Slide For Each oSl In ActivePresentation.Slides For Each oSh In oSl.Shapes If Len(oSh.Tags("PeekabooText")) > 0 Then oSh.TextFrame.TextRange.Text = "" End If Next ' oSh Next ' oSl End Sub Sub UnhidePeekaboos() ' Resets the shapes with peekaboo text to make the text visible Dim oSh As Shape Dim oSl As Slide For Each oSl In ActivePresentation.Slides For Each oSh In oSl.Shapes If Len(oSh.Tags("PeekabooText")) > 0 Then oSh.TextFrame.TextRange.Text = oSh.Tags("PeekabooText") End If Next ' oSh Next ' oSl End Sub Sub HidePeekaboos() ' Resets the shapes with peekaboo text to make the text invisible ' You must have activated the text as peekaboo one time for this to work Dim oSh As Shape Dim oSl As Slide For Each oSl In ActivePresentation.Slides For Each oSh In oSl.Shapes If Len(oSh.Tags("PeekabooText")) > 0 Then oSh.TextFrame.TextRange.Text = "" End If Next ' oSh Next ' oSl End Sub