none
Password to save document RRS feed

  • Question

  • The Word Documents.Open method has a parameter:

    WritePasswordDocument

    Optional

    Variant

    The password for saving changes to the document.

    How is this password set in the first place?  Thanks


    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Monday, August 4, 2014 5:06 PM

Answers

  • Interactively:

    Select File > Save As.

    Click Tools > General Options... to the left of the Save button:

    Set the "Password to modify":

    Using VBA:

    ActiveDocument.WritePassword = "secret"

    or

    ActiveDocument.SaveAs2 FileName:="...", WritePassword:="secret"


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by Greg Maxey Monday, August 4, 2014 5:51 PM
    Monday, August 4, 2014 5:46 PM

All replies

  • Interactively:

    Select File > Save As.

    Click Tools > General Options... to the left of the Save button:

    Set the "Password to modify":

    Using VBA:

    ActiveDocument.WritePassword = "secret"

    or

    ActiveDocument.SaveAs2 FileName:="...", WritePassword:="secret"


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by Greg Maxey Monday, August 4, 2014 5:51 PM
    Monday, August 4, 2014 5:46 PM
  • Hans,

    Thanks!  Classic case of can't see the tree for the forest.


    Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

    Monday, August 4, 2014 5:52 PM