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 / Programming / March 2006

Tip: Looking for answers? Try searching our database.

How to restart numbering in a list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reb - 08 Mar 2006 16:14 GMT
Hi,

I'm applying a numbered list style to some text within a macro.
However, when I test the macro, the list numbering is continuing from
previous rather than restarting. Can anyone tell me what I need to do
in VB to reset the numbering .. here is a snippet of what I have:

   Selection.TypeText Text:="Answer the questions using the space
provide."
   Selection.TypeParagraph
   Selection.Style = ActiveDocument.Styles("My.NumberedList")
   Selection.TypeText Text:="Question 1 text"
 
Thanks
Reb
Greg - 08 Mar 2006 17:29 GMT
Reb,

Like a used car salesman (no offense if that is your trade), I could
probably sell you something that seems to run great, but doesn't work.

Word's numbering is notoriously complex and attempting to do what you
describe would IMHO option wind up causing you great frustration.  It
could be done.  Here is one way.  Select one of your paragraphs that
you want the number to restart as 1.  Record a macro of the process of
going to Fomat>Bullets and Numbering  Select your list gallery and
click restart numbering.  Then simply call that macro at the end of
your existing code.

It will appear to work, but if you read some of the material in the
following link you will probably abandon that approach.

http://gregmaxey.mvps.org/SEQ_Field_Numbering.htm
Jezebel - 09 Mar 2006 04:37 GMT
   Dim pListTemplate           As Word.ListTemplate

   :

   'The selection is the paragraph at which you want to restart the
numbering, already formatted with a numbering style
   Set pListTemplate = Selection.Range.ListFormat.ListTemplate
   Selection.Range.ListFormat.ApplyListTemplate
ListTemplate:=pListTemplate, ContinuePreviousList:=False

> Hi,
>
[quoted text clipped - 11 lines]
> Thanks
> Reb
 
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.