View Single Post
 
Old 12-08-2014, 06:17 PM
htownpaper htownpaper is offline Windows 8 Office 2010 64bit
Novice
 
Join Date: Dec 2014
Posts: 5
htownpaper is on a distinguished road
Default

actually this is right:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "[0-9]@>"
    .Font.Superscript = True
    .Replacement.Text = ""
    .Format = True
    .Forward = True
    .Wrap = wdFindStop
    .MatchWildcards = True
    .Execute
  End With
  i = 0
  Do While .Find.Found
    .Text = CLng(i + 1)
    .Collapse wdCollapseEnd
    .Find.Execute
    i = i + 1
  Loop
End With
Application.ScreenUpdating = True
End Sub

Last edited by macropod; 12-08-2014 at 06:35 PM. Reason: Added code tags & formatting
Reply With Quote