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.

ProtectedForForms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Senad Isanovic - 22 Mar 2005 16:10 GMT
I recorded this code. Need to protect different sections in the document.
But when I run this code nothing heppens. Something is missing... Thanks for
any help,

ActiveDocument.Sections(1).ProtectedForForms = False
ActiveDocument.Sections(2).ProtectedForForms = True
Chuck - 22 Mar 2005 17:50 GMT
I think you'll find that the code has set the protection for section 2 (Tools
> Protect Document... > Forms: >Sections...).

You need to protect the document in order to see the protection at work:

ActiveDocument.Protect _
   Password:="", _
   NoReset:=False, _
   Type:=wdAllowOnlyFormFields

Set the password to whatever you want (or nothing, or prompt the user for a
password).  Change NoReset to True if you don't want existing form field
contents to be erased on protect.

> I recorded this code. Need to protect different sections in the document.
> But when I run this code nothing heppens. Something is missing... Thanks for
> any help,
>
> ActiveDocument.Sections(1).ProtectedForForms = False
> ActiveDocument.Sections(2).ProtectedForForms = True
 
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.