![]() |
|
#1
|
||||
|
||||
![]()
You could use a macro like:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long, j As Long i = 1: j = i With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "^13[0-9]@^13" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found .Start = .Start + 1 .End = .End - 1 If .Text <> j Then .Text = j j = j + 1 .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True MsgBox j - i & " page #s validated." End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA to Find and Format Text string defined using Inputbox within selection | sistemalan | Word VBA | 7 | 10-03-2014 07:28 AM |
![]() |
Hoxton118 | Word VBA | 7 | 06-10-2014 05:05 AM |
![]() |
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |
Help! Find text in doc file & copy to another file | northstarman | Word | 1 | 11-05-2010 08:15 AM |
Automatic find replace after selection in dropdown | vsempoux | Word | 0 | 10-28-2009 08:45 AM |