How do I add a “required filed†in a protected document?

V

Vicid

I have created a protected document in word 2000. Is there a way to have a
required filed? Within my document so users will have to fill in the filed.
 
J

Jay Freedman

Vicid said:
I have created a protected document in word 2000. Is there a way to
have a required filed? Within my document so users will have to fill
in the filed.

See http://word.mvps.org/FAQs/TblsFldsFms/ValidateFFields.htm for the macros
you need. In place of the line

If Len(.Result) > 0 And Left$(.Result, 3) <> "KLM" Then

you need to use

If Len(Trim(.Result)) = 0 Then

to check for a field that's empty or contains only spaces.

Note that this method works only if the user tabs or clicks into the field
and then tries to exit from it. It never gets a chance to run if the user
never goes to that field. To ensure that the field is filled in, either make
it the first field in the document (so the cursor starts there when the
document opens) or add macros to intercept the print and save functions and
call the validation macro before performing the actual print or save -- see
http://word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm.
 
W

Word Heretic

G'day "Vicid" <[email protected]>,

Yes, but it requires VBA. Use the FAQs and other resources at
word.mvps.org to get up to speed, or I can provide this as a
commercial service if you require.


Steve Hudson - Word Heretic

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


Vicid reckoned:
 

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