Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    protect all field in doc module (2000 sr-1)

    I know the way to protect word module via code.... but i have see if i protect module the filed are editable!!!!!

    is possible to protect also the fileds in module, via code naturally.
    Tks.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: protect all field in doc module (2000 sr-1)

    Hi Sal,

    In Word, you don't protect individual fields. Instead, you protect the Section of the document they are in. To protect a Section, you can use the Protect for Forms feature. You can do this with a macro, using code like:
    With ActiveDocument
    .Sections(n).ProtectedForForms = True
    .Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:="YourPassword"
    End With
    Where 'n' is the number of the Section to be protected. That Section will be protected but you will still be able to edit other Sections of the document. The 'NoReset:=True' parameter is useful if you need to unprotect the document so that you can run a spell check on the contents of the formfields. You don't need it to protect the document for the first time. Conversely, you don't need to use '.Sections(n).ProtectedForForms = True' after the first time, or if you want to protect a document consisting of only one Section.

    With your document, it is important to understand that you can't protect just part of a table - it's all or nothing. If you put a Section break into the table so that you can protect some rows, Word actually splits the table in two - horizontally. You can't use a Section break to split a table vertically.

    To unprotect the document, you could use:
    ActiveDocument.Unprotect Password:="YourPassword"
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: protect all field in doc module (2000 sr-1)

    Hummmm....
    Very string work for me have 87 different doc with similar condition....
    In effect i fill all fields in doc word via vba and after i send the doc via email.
    Naturally i dont want to permit to the user that recive the doc to modify it! <img src=/S/stop.gif border=0 alt=stop width=26 height=24> (the doc are Official and important document, understand me!)
    If you have other suggestion or strathegy are welcome.
    Tks.

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

    Re: protect all field in doc module (2000 sr-1)

    Even if you protect a Word document, the recipient can import the document into a blank document and edit the text there.
    You might use Adobe Acrobat to create a protected PDF file from the document. You can set it up so that the user can only view the PDF file, but not copy text from it or print it.

  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: protect all field in doc module (2000 sr-1)

    Even then, the user could use a screen-capture utiltiy (or simply Alt-Printscreen) to capture the image, OCR it and output the text to a new document, which could then be altered.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

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

    Re: protect all field in doc module (2000 sr-1)

    Very true. So in the end, the only really secure method is not sending anything at all <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

Posting Permissions

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