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 / August 2006

Tip: Looking for answers? Try searching our database.

What am I doing Wrong: Section Break Protection

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brendan - 16 Aug 2006 01:06 GMT
I have a document and at the bottom of page 1, I insterted a "Section Break
(Next Page)".  On the Sub_AutoNew, I call the following as per another post
to protect everything above the section  ---
ActiveDocument.Sections(1).ProtectedForForms = True  --- However, nothing
happens when I open a new document from the template.  I know that the
AutoNew is working as I force the user into a bookmark out of the gate.  

Another post spoke about going to TOOLS, PROTECT DOCUMENT, and there would
be some prompt box for protecting only sections.  The only thing that happens
when I go this route is a popup on the right side of the document appears
with Formatting Restrictions, Editing Restrictions, and Starte Enforcement.

My overall goal is to only protect page 1 as page 2 and so on are open
typing for the user.
Jezebel - 16 Aug 2006 01:20 GMT
> Another post spoke about going to TOOLS, PROTECT DOCUMENT, and there would
> be some prompt box for protecting only sections.  The only thing that
> happens
> when I go this route is a popup on the right side of the document appears
> with Formatting Restrictions, Editing Restrictions, and Starte
> Enforcement.

Check the 'Editing restrictions' checkbox. Select 'Filling in forms' from
the dropdown (which becomes enabled when you check the box). 'Select
sections' will appear beneath the dropdown. Click and select section one.
Jay Freedman - 16 Aug 2006 01:28 GMT
If you must do this in a macro, you have to set the ProtectedForForms
property for each section -- or at least for those that should *not*
be protected -- and then you also have to turn on the protection:

   ActiveDocument.Sections(1).ProtectedForForms = True
   ActiveDocument.Sections(2).ProtectedForForms = False
   ActiveDocument.Protect Type:=wdAllowOnlyFormFields

The first of these lines is optional, because the .Protect method
assumes that all sections should be protected unless you specifically
state otherwise.

To do it without a macro: First insert at least one section break in
the document (you've already done this). Then open the Protect
Document task pane (what you called a popup, but it isn't that), check
the box under Editing Restrictions, and select "Filling in forms" in
the dropdown. At that time, a blue link "Select sections..." appears
under the dropdown. Click that link to get a dialog where you can
uncheck Section 2.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>I have a document and at the bottom of page 1, I insterted a "Section Break
>(Next Page)".  On the Sub_AutoNew, I call the following as per another post
[quoted text clipped - 10 lines]
>My overall goal is to only protect page 1 as page 2 and so on are open
>typing for the user.
Brendan - 16 Aug 2006 02:29 GMT
Ok.  Where does the section go for protection?  At the bottom of page one and
when I use the below code, it protects everything from the insertion point
up?  Or does it protect down to the next section break?  Also, the section
breaks are NOT labeled so how do I know which one is which if I have numerous
section breaks in a document?

> If you must do this in a macro, you have to set the ProtectedForForms
> property for each section -- or at least for those that should *not*
[quoted text clipped - 37 lines]
> >My overall goal is to only protect page 1 as page 2 and so on are open
> >typing for the user.  
Jezebel - 16 Aug 2006 02:43 GMT
> Ok.  Where does the section go for protection?  At the bottom of page one
> and
[quoted text clipped - 3 lines]
> numerous
> section breaks in a document?

The sections are numbered: one to however many you have. The code protects
whichever section you specify. Select anywhere within the section, and the
section number is shown in the status bar. Or display the document in Normal
view and count them.
 
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.