Re: Unprotect and Protect template when user enters a Formfield
- From: "Charles Kenyon" <wordfaq@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Jun 2006 10:09:58 -0500
An onexit macro is activated when the user leaves a formfield in a protected
form. Problem is, when you user exits, the form is not protected. You are
going to have to do something more elaborate.
--
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
"Frank" <Frank@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F26C73FE-8F15-4B80-927B-DD4820A519C0@xxxxxxxxxxxxxxxx
Hi All,
I ran into another 'problem' with a protected template. I want the
protection switched off when a users tabs to a formfield (in my example
Description) so the user can change the style and the font of this
Formfield.
After that, when he goes to the next formfield the protection should be
switched on again.
I have tried it with 2 macro's (and in the formfield switched the option
Run
Marco on Entry and Exit)
Macro 1= ActiveDocument.Unprotect Password:="password"
This works fine!
Marco 2 (on Exit)
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True_
Password = "password"
The second macro doesn't work anymore. So the protection stays off when
the
user leaves this Formfield. Can anyone help me with this?
Thanks in advance!
Kind regards,
Frank
.
- Follow-Ups:
- Prev by Date: Re: Windows API and Callback Functions
- Next by Date: Adding a footer to an inserted macro
- Previous by thread: Re: Unprotect and Protect template when user enters a Formfield
- Next by thread: Re: Unprotect and Protect template when user enters a Formfield
- Index(es):
Relevant Pages
|