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

got it!
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
  Do While .Find.Found
    If .Text = "0" Then
      .Text = CLng(.Text + 1)
      i = 1
    Else
      .Text = CLng(i + 1)
      i = i + 1
      .Collapse wdCollapseEnd
      .Find.Execute
    End If
  Loop
End With
Application.ScreenUpdating = True
End Sub

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