View Single Post
 
Old 10-29-2013, 08:37 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You could start with something like this. Probably will need a little work so use a copy!

Code:
Sub Obfuscate()
    Dim osld   As Slide
    Dim oshp   As Shape
    Dim iRow   As Integer
    Dim iCol   As Integer
    Dim wrd    As Long
    Dim otxTemp As TextRange

    For Each osld In ActivePresentation.Slides
        For Each oshp In osld.Shapes
            If oshp.HasTable Then
                For iRow = 1 To oshp.Table.Rows.Count
                    For iCol = 1 To oshp.Table.Columns.Count
                        If oshp.Table.Cell(iRow, iCol).Shape.HasTextFrame Then
                            If oshp.Table.Cell(iRow, iCol).Shape.TextFrame.HasText Then
                                Set otxTemp = oshp.Table.Cell(iRow, iCol).Shape.TextFrame.TextRange
                                For wrd = 1 To otxTemp.Words.Count
                                    otxTemp.Words(wrd) = String$(Len(Trim(otxTemp.Words(wrd))), "*") & " "
                                    Next wrd
                            End If
                        End If
                    Next iCol
                Next iRow
            Else
                If oshp.HasTextFrame Then
                    If oshp.TextFrame.HasText Then
                        Set otxTemp = oshp.TextFrame.TextRange
                        For wrd = 1 To otxTemp.Words.Count
                            otxTemp.Words(wrd) = String$(Len(Trim(otxTemp.Words(wrd))), "*") & " "
                        Next wrd
                    End If
                End If
            End If
        Next oshp
    Next osld
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote