Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    860
    Thanks
    0
    Thanked 10 Times in 9 Posts

    Encrypt Document

    Is there a VBA command to display (and then execute) the Encrypt Document dialog box? I want to present this dialog box to the user to create a password. If the document is already password encrypted, I want to see the the password symbols in the password field. (Otherwise, I would create my own dialog box; but the password is write only.)

    Thanks.

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    Are you talking about this dialog?
    Dialogs(wdDialogToolsProtectDocument).Show

    If not, how do you normally summon the dialog?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    860
    Thanks
    0
    Thanked 10 Times in 9 Posts
    No, not that dialog box. The dialog box I'm after (Word 2010) is under File>Info>Protect Document>Encrypt with Password.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,514
    Thanks
    3
    Thanked 143 Times in 136 Posts
    All righty then, try

    Application.CommandBars.ExecuteMso ("FileDocumentEncrypt")
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    860
    Thanks
    0
    Thanked 10 Times in 9 Posts
    Perfect. Thank you!

Posting Permissions

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