Consulting

Results 1 to 2 of 2

Thread: Check if password applied to Restrict formatting and editing

  1. #1
    VBAX Newbie
    Joined
    Nov 2017
    Posts
    1
    Location

    Check if password applied to Restrict formatting and editing

    Hi,

    I have got a question re. the password protection for formatting restrictions in Word.

    For the ActiveDocument, I need to check whether formatting restrictions are applied (visible under Review > Restrict Editing > Formatting restrictions).
    This I could easily implement with:
    If ActiveDocument.EnforceStyle
    Additionally, I need to verify whether a password has been defined (which can be optionally done when you click "Yes, Start Enforcing Protection").

    However, I have not been able to find the corresponding property.
    The following code
    If ActiveDocument.HasPassword
    returns true only for the password required to open the document, which is not my case.

    I do not want to modify the password, I just need to verify whether one is set. Any ideas?

    I posted this question on the MSDN forum (https://social.msdn.microsoft.com/Forums/en-US/73da439e-4050-4145-9efe-29dd26dd7656/word-check-if-password-applied-to-restrict-formatting-and-editing?forum=isvvba) several days ago, but could not get any hint.

    Thank you.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Moderator bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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