Renumbering lists programmatically

B

ben.mounsey

Hi there,

I'm working on a macro for wide use with legal forms, and one of the
requirements is to have the ability to hide or strikeout inapplicable
sections, while leaving the form protected to fill in forms only.

I've accomplished this by encapsulating each item that will require the
hide/strikeout modifications within continuous section breaks, and
included a checkbox in each section for the end users to toggle the
hiding/strikeout feature which is kicked off by the appropriate toolbar
button.

An additional requirement, presented to me after this dev work was
completed, was that in the case of a hidden section, the subsequent
sections would renumber themselves. I'm having difficulty coming up
with an elegant solution for this.

A sample section of the form looks like this, where [] denotes a
checkbox formfield:

1. [](a) This is the first item

[](b) This is the second item

[](c) This is the third item

[](d) Fourth item
.... etc...

If section b is hidden, then section (c) should become (b) and (d)
should become (c) and so on down the line. I'd also like this to be
toggle-able.. is this easily done? I can't use a numbered list because
hiding the text doesn't renumber the list - only deleting the list item
will do that and I can't delete from the form, only hide.

Thanks for any assistance in advance!

Ben
 
W

Word Heretic

G'day (e-mail address removed),

Your specifications have exceeded the application's capabilities. I
highly recommend head butting contests or a few round of drinks (the
latter is much more preferred) to produce a set of real-world
specifications.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


(e-mail address removed) reckoned:
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
Hi there,

I'm working on a macro for wide use with legal forms, and one of the
requirements is to have the ability to hide or strikeout inapplicable
sections, while leaving the form protected to fill in forms only.

I've accomplished this by encapsulating each item that will require
the hide/strikeout modifications within continuous section breaks, and
included a checkbox in each section for the end users to toggle the
hiding/strikeout feature which is kicked off by the appropriate
toolbar button.

An additional requirement, presented to me after this dev work was
completed, was that in the case of a hidden section, the subsequent
sections would renumber themselves. I'm having difficulty coming up
with an elegant solution for this.

A sample section of the form looks like this, where [] denotes a
checkbox formfield:

1. [](a) This is the first item

[](b) This is the second item

[](c) This is the third item

[](d) Fourth item
... etc...

If section b is hidden, then section (c) should become (b) and (d)
should become (c) and so on down the line. I'd also like this to be
toggle-able.. is this easily done? I can't use a numbered list
because hiding the text doesn't renumber the list - only deleting the
list item will do that and I can't delete from the form, only hide.

As Steve wrote, as is, no can do...

But, you could have a button on the toolbar labelled "produce final
document" or something like that. This would do a Save As and then proceed
to delete the hidden sections, thus automatically renumbering the list. If
the user should realize later that he forgot to include/remove a section, he
could go back to his original document, do the changes and re-click on the
toolbar button which would overwrite any previously produced document so
that the user would only have one "good" document in hid folder.

Or, as another alternative, if your document is using styles as it should,
each style in the document should have a "hidden"counterpart, so, instead of
just applying "hidden" to the section, you loop each paragraph and apply the
hidden counterpart. Now that hidden and non-hidden parts are set to
different styles, the numbering should be as you want. Make sure each
numbered list is defined properly, not based on each other.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
K

Klaus Linke

Hi Ben,

If you use "Track changes", the list will renumber if you delete (strikeout)
some list items.
Why is it that you "can't delete from the form"?

Regards,
Klaus
 

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