Results 1 to 8 of 8
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protect section (Word 97/2000/...)

    Hi,

    Another question. I have template with several different sections (top section, change history section, TOC section, User information, last page section) all with different headers and footers. What I would like is to NOT to allow the user to insert anything in the last section - they seem to willy-nilly type/paste things in it. I can use the WORD 'what I would loosley term a feature' of protecting a document and protect a specific section. But this means that some of WORD functionality is disabled - not good.

    So is there a way of preventing if they try to type/paste anything into this particular section? What would be nice is to take them on the last page of the previous section and copy information there? Is this at all possible without too much effort?

    Thanks in advance.

    Robie
    Thanks.
    Robie

  2. #2
    Star Lounger
    Join Date
    Feb 2002
    Location
    Illinois, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protect section (Word 97/2000/...)

    I'm not sure this will provide everything yo9u want, but you can try the following:
    1. In your last section insert a small (1X1) table.
    2. Clip Tool > Protect Document > Forms
    3. Uncheck all sections except the last one.

    This will protect your last section from modification, users will only be able to get to the bottom of the section preceding your last section. You can remove the visible lines from your table to make the last page appear blank.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protect section (Word 97/2000/...)

    Thanks Spence but that is not a good solution since it disables quite a few menu options (e.g. unable to insert text box, bookmarks etc, can't access Page Setup, etc.). What I don't understand is why are these options disabled for non-protected part of the document - Microsoft has lot to answer for and they do not. I have asked Microsoft support this question and no answer forthcoming. If it didn't disable the menu options then it a PERFECT solution.

    Hope I can find another solution quickly.

    Thanks once again.

    Robie
    Thanks.
    Robie

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Protect section (Word 97/2000/...)

    Robie,

    Small consolation perhaps, but it's not a new problem. When you protect any part of a document, even a section, those menu items get grayed out.

    To some extent it's possible to understand why it would be difficult for MS to allow access to all of the menu items, when working in an unprotected section of a partially protected document: many menu items operate on the entire document - for instance the spelling checker. To enable such features to selectively work in the unprotected sections only, would mean adding a good bit of additional programming into these features, to deal with this scenario. In some cases it might be prohibitively difficult to provide for - for example, if you were displaying a list of a document's styles, or a list of bookmarks, it would be prohibitively difficult to code the feature to deal with the styles or bookmarks that were contained in the protected section(s).

    Don't know if the following workaround is any use to you, but if you have some fixed content in the last section of the document, and that section is just one page long, you could perhaps put the content into the header for that section, and leave nothing in the actual text part of that section. You could even change the font for the one paragraph mark in that section, to 1 pt size and white. That would certainly discourage your users from typing in there!

    Gary

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Protect section (Word 97/2000/...)

    The attached document uses the application level WindowSelectionChange event to keep the user out of the last section of the document. All menu options are available in other sections.
    However, if the user disables the macros in the document (either explicitly or because macro security is set to High), the last section can be edited. And if the user deletes all section breaks, an error will occur.
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Protect section (Word 97/2000/...)

    I guess it might be possible to store the document protected, and turn off the protection from VBA. That way a user who disabled the Macros would get the limited functionality, and one who enables them would get all the menus.

    Of course you would then need to intercept FileSave and FileSaveAs to ensure that protection was turned on again when the document is saved - and I have no idea how you would cope with AutoRecovery saves.

    StuartR

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Protect section (Word 97/2000/...)

    Here is a version that unprotects the document in the Document_Open event, and reprotects it in the Document_Close event. In a "real" situation, you might want to use a password.
    Attached Files Attached Files

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Protect section (Word 97/2000/...)

    Very nice. I opened the document, and since my Macro security is set to high I got the protected document. I then signed the Macros and saved - this time it opened with your Macros running, the document not protected, and section 2 unvisitable.

    StuartR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •