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

PowerPoint search doesn't support wildcards as Word does.

You could use a macro though

Sub use_regex()
Dim regX As Object
Dim osld As Slide
Dim oshp As Shape
Dim strInput As String
Dim b_found As Boolean
Dim iRow As Integer
Dim iCol As Integer

Set regX = CreateObject("vbscript.regexp")
With regX
.Global = True
.Pattern = "(\$)\d+\,*\d*\,*\d*(/)"
End With
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
strInput = oshp.Table.Cell(iRow, iCol).Shape.TextFrame.TextRange.Text
b_found = regX.Test(strInput)
If b_found = True Then
strInput = regX.Replace(strInput, "$1***$2")
oshp.Table.Cell(iRow, iCol).Shape.TextFrame.TextRange = strInput
End If
Next iCol
Next iRow
Else
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
strInput = oshp.TextFrame.TextRange.Text
b_found = regX.Test(strInput)
If b_found = True Then
strInput = regX.Replace(strInput, "$1***$2")
oshp.TextFrame.TextRange = strInput
End If
End If
End If
End If
Next oshp
Next osld
Set regX = Nothing
End Sub

Should work

How to use
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote