Sort Tables in Protected Doc

K

Keenly52

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.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?S2Vlbmx5NTI=?=,
I'm creating a user form in Word that includes a table to be sorted afterthe

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
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 :)
 

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