Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

Sort Tables in Protected Doc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Keenly52 - 29 Mar 2005 08:31 GMT
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 :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.