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 / November 2005

Tip: Looking for answers? Try searching our database.

Renumbering lists programmatically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ben.mounsey@gmail.com - 19 Oct 2005 21:39 GMT
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
Word Heretic - 21 Oct 2005 14:06 GMT
G'day ben.mounsey@gmail.com,

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

ben.mounsey@gmail.com reckoned:

>Hi there,
>
[quoted text clipped - 34 lines]
>
>Ben
Jean-Guy Marcil - 21 Oct 2005 15:37 GMT
ben.mounsey@gmail.com was telling us:
ben.mounsey@gmail.com nous racontait que :

> Hi there,
>
[quoted text clipped - 30 lines]
> 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.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Klaus Linke - 25 Nov 2005 02:05 GMT
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

> Hi there,
>
[quoted text clipped - 34 lines]
>
> Ben

Rate this thread:






 
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.