![]() |
#6
|
||||
|
||||
![]()
Try:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long, Rng As Range With ActiveDocument For i = 1 To .ComputeStatistics(wdStatisticPages) Set Rng = .GoTo(What:=wdGoToPage, Which:=wdGoToAbsolute, Name:=i) Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\Page") With Rng With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "<BRANDŽ[!\(]{1,5}\([!\)]@\)" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With If .Find.Found Then .Text = Trim(Split(.Text, "(")(0)) End If End With Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issue with wildcard search | mysterytramp | Word | 0 | 05-13-2015 10:40 AM |
Where is the error in my wildcard search? | Ulodesk | Word | 10 | 06-30-2014 01:46 PM |
![]() |
NobodysPerfect | Word VBA | 4 | 06-11-2014 11:02 AM |
![]() |
NobodysPerfect | Word | 10 | 03-19-2014 04:29 AM |
Wildcard search help. | Kempston | Word | 0 | 11-13-2009 03:58 AM |