Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2013, 08:37 AM
JohnWilson JohnWilson is offline Replace all text with XXXX Windows 7 64bit Replace all text with XXXX 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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace all text with XXXX Replace text in multiple documents? Roscoe Word VBA 7 07-31-2017 04:02 PM
Replace all text with XXXX Macro to find text and replace with form field containing that text iiiiifffff Word VBA 16 06-04-2016 01:47 AM
find and replace text Outlook VBA help switchup621 Outlook 1 08-13-2013 10:05 AM
Replace all text with XXXX How to replace text with [] around it? Barcode Word 4 04-04-2013 03:09 AM
Replace formatting with text eyehefbee Word 2 11-09-2009 02:41 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft