Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word forms

Status
Not open for further replies.

carlossan

Programmer
Dec 10, 2005
18
CA
Hi,

I have a document in Word that could use some forms to be more efficient. The problem I have is that if I add forms (for example I'm adding some drop down fields) I can't freely change the remaining of the document.

To solve this I was considering to add some text fields, but the issue is that I have lots of text, several tables, a table of content, etc, so I would need to do lots of work adding text fields everywhere, and even then I don't know how to update the table of contents once the form is protected.

Any ideas about a simpler way to do this ?

Thanks.

Regards,

Carlos
 
The problem I have is that if I add forms (for example I'm adding some drop down fields) I can't freely change the remaining of the document.
Use Continuous Section breaks. Make the chunks with the formfields protected, the other chunks (in their own sections) NOT protected.
To solve this I was considering to add some text fields, but the issue is that I have lots of text, several tables, a table of content, etc, so I would need to do lots of work adding text fields everywhere,
Can't say much about the amount of work. That is entirely the design of the document, and what the text formfields are used for.
I don't know how to update the table of contents once the form is protected.
You can't with the document protected. You will either have to manually unprotect and update; or use VBA.

Hard to say since I can't see the document, but it sounds like you can use some VBA with this.



Gerry
My paintings and sculpture
 
Hi carlossan,

You can update the TOC in your protected document without the need to use vba to unprotect & reprotect it, but the method's a bit klunky. Here’s how:
· Create a SET field named 'MyTOC' after the formfield
· Cut and paste the real TOC into the SET field , thus:
{SET MyTOC {TOC}}
· Update the new field. It will create a MyTOC bookmark and more or less disappear.
· Use a REF field where you want the TOC to appear, coded as:
{REF MyTOC} or {MyTOC}
· Lock the form and use in the normal way.

If you then do a print preview after updating the formfields, the page numbers in the substitute TOC will update, though you might have to do a print preview twice to get the right result (this behaviour may have something to do with the REF field being located before the bookmark it refers to).


Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top