consecutive re-numbering

G

Guest

I HAVE A 100 PAGE BOOK CREATED IN WORD 98. I NOW HAVE
WORD XP-2002. I HAVE MOVED 8 PAGES TO ANOTHER LOCATION IN
THE BOOK. WHEN I TRY TO CONSECUTIVELY RE-NUMBER THE BOOK
IT DOES FINE UNTIL IT GETS TO THE PAGES I MOVED, THEY ARE
STILL THE SAME NUMBERS AS THEY WERE BEFOREI MOVED THEM.
HELP!
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi,

What numbers are you talking about - Page Numbers or paragraph numbers?

If the latter, sounds like they were "hard" numbered. If that's the case,
the following macro might be of use to you:

' Macro created 2 January, 1999 by Doug Robbins to apply/re-apply numbering
to a range of paragraphs

'

Numparas = Selection.Paragraphs.Count

Selection.MoveLeft Unit:=wdCharacter, Count:=1

ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes

Selection.Extend

Selection.MoveRight Unit:=wdCharacter, Count:=1

If Mid(Selection.Text, 3, 3) = "SEQ" Then

Selection.MoveRight Unit:=wdCharacter, Count:=2

Selection.Delete Unit:=wdCharacter, Count:=1

Else

Selection.Collapse Direction:=wdCollapseStart

End If

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _

"SEQ numberedlist\r 1", PreserveFormatting:=True

With Selection.ParagraphFormat

.LeftIndent = CentimetersToPoints(1.27)

.FirstLineIndent = CentimetersToPoints(-1.27)

End With

Selection.TypeText Text:="." & vbTab

Counter = 1

While Counter < Numparas

Selection.Move Unit:=wdParagraph, Count:=1

Selection.Extend

Selection.MoveRight Unit:=wdCharacter, Count:=1

If Mid(Selection.Text, 3, 3) = "SEQ" Then

Selection.MoveRight Unit:=wdCharacter, Count:=2

Selection.Delete Unit:=wdCharacter, Count:=1

Else

Selection.Collapse Direction:=wdCollapseStart

End If

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _

"SEQ numberedlist", PreserveFormatting:=True

With Selection.ParagraphFormat

.LeftIndent = CentimetersToPoints(1.27)

.FirstLineIndent = CentimetersToPoints(-1.27)

End With

Selection.TypeText Text:="." & vbTab

Counter = Counter + 1

Wend

ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes



End Sub


Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top