Access to auto applied numbering in VBA

G

groupsRgreat

I am trying to write a macro that will automatically number
requirements in a document.

----------------------------------------
My goal is the having the following output:

1.1 Paragraph Heading

The system shall[1.1-1]...
The system shall[1.1-2]...

1.2
The system shall[1.2-1]...
----------------------------------------

I have two questions:
1) Is there a way for VBA to get access to the auto generated numbers
(1.1 and 1.2 in the examples above)? I haven't found a method/property
that will provide access to the number.
2) Is there an easy/preferred way to restart the requirement number at
1 for each major paragraph. I had to insert a section break in order
to accomplish this. I think there is a better way that will avoid me
having to insert a section break into the document.

Any help would be appreciated. Thanks in advance.
 
G

groupsRgreat

I answered my first question.

I can use: range.ListFormat.ListString where range points to my
paragraph heading.

I was just lost in the VB object model maze.

Maybe my own reply will help someone else.
 
M

Margaret Aldis

It shouldn't be necessary to use VBA to achieve what you want - add an extra
level to the numbering scheme (for the -n suffix), not linked to any style,
and insert using a LISTNUM field?
 

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