Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    856
    Thanks
    0
    Thanked 9 Times in 8 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. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,506
    Thanks
    3
    Thanked 141 Times in 134 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

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

  5. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,506
    Thanks
    3
    Thanked 141 Times in 134 Posts
    All righty then, try

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

  6. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    856
    Thanks
    0
    Thanked 9 Times in 8 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
  •