Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / September 2003

Tip: Looking for answers? Try searching our database.

Reverse Numbering Order

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Law - 25 Sep 2003 16:55 GMT
I have input a numbered list from 1 to 10.  How do I get
to Word to reverse the order instead of me having to type
it in manually?
Doug Robbins - Word MVP - 26 Sep 2003 01:03 GMT
Hi Tony,

Here's a macro that will do it:

' Macro created 25/04/1999 by Doug Robbins to apply/re-apply reverse
sequential numbering
'
   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 InStr(Selection.Text, "SEQ") > 0 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, _
   PreserveFormatting:=False
   Selection.TypeText Text:="=" & Numparas + 1 & "-"
   Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
       PreserveFormatting:=False
   Selection.TypeText Text:="SEQ  ""ReverseList"""
   With Selection.ParagraphFormat
       .LeftIndent = CentimetersToPoints(1.27)
       .FirstLineIndent = CentimetersToPoints(-1.27)
   End With
   Selection.MoveRight Unit:=wdCharacter, Count:=4
   Selection.InsertAfter "." & vbTab
   Counter = 1
   While Counter < Numparas
       Selection.Move Unit:=wdParagraph, Count:=1
       Selection.Extend
       Selection.MoveRight Unit:=wdCharacter, Count:=1
       If InStr(Selection.Text, "SEQ") > 0 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, _
       PreserveFormatting:=False
       Selection.TypeText Text:="=" & Numparas + 1 & "-"
       Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
       PreserveFormatting:=False
       Selection.TypeText Text:="SEQ ""ReverseList"""
       With Selection.ParagraphFormat
           .LeftIndent = CentimetersToPoints(1.27)
           .FirstLineIndent = CentimetersToPoints(-1.27)
       End With
       Selection.MoveRight Unit:=wdCharacter, Count:=4
       Selection.InsertAfter "." & vbTab
       Counter = Counter + 1
   Wend
   ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
   ActiveDocument.Select
   ActiveDocument.Fields.Update

Signature

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

> I have input a numbered list from 1 to 10.  How do I get
> to Word to reverse the order instead of me having to type
> it in manually?
Suzanne S. Barnhill - 26 Sep 2003 03:50 GMT
See http://homepage.swissonline.ch/cindymeister/NbrFAQ.htm#RevNbr

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> I have input a numbered list from 1 to 10.  How do I get
> to Word to reverse the order instead of me having to type
> it in manually?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.