How to restart numbering in a list

R

Reb

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
 
G

Greg

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
 
J

Jezebel

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
 

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