I'm creating a user form in Word that includes a table to be sorted afterthe
> user enters their info - specifically a sort on the "date" column.
My situation: Office 2003, template is Password protected, some sections
left unprotected, big file - 14 pages, 8 sections and over 320 form fields.
The Macro I need:
Word formfield checkbox exit macro
Checks value of checkbox - false does nothing, "true" triggers the rest
Unprotect document, prevent reset
* I have the code for the sort
Reprotect the document with password, leaving some sections unprotected
Any help with a solution is greatly appreciated. Thanks.
ken.
Cindy M -WordMVP- - 30 Mar 2005 11:07 GMT
Hi =?Utf-8?B?S2Vlbmx5NTI=?=,
> I'm creating a user form in Word that includes a table to be sorted afterthe
> > user enters their info - specifically a sort on the "date" column.
[quoted text clipped - 8 lines]
> * I have the code for the sort
> Reprotect the document with password, leaving some sections unprotected
doc.Unprotect "password"
'You may first want to check the ProtectionType, just to avoid an error if the
document should already be unprotected, for some reason
'Perform the sorting
doc.Protect wdAllowOnlyFormfields, True, "password"
Note that the document should remember the sections' protection settings, so
you should need to do this in your code.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)