We help IT Professionals succeed at work.

Protect Document - Remove Editing Restrictions

fakoua
fakoua asked
on
Medium Priority
1,648 Views
Last Modified: 2012-08-13
I recently created a template that uses editing restriction from the Protect Document Task Pane. In my code I want to be able to remove that protection for a specific user which I can do. The only caveat is that I am unable to remove the Highlighted Unprotected portions of the document. The only way I am able to do this is through the Task Pane by unselectting the Editing Restrictions checkbox and answering "yes" to the dialog pop-up which asks if I want to ignore exceptions. This is what I want to do in the code (VBA)

Any suggestions?

NB: ActiveWindow.View.ShadeEditableRanges  does not work after UNPROTECT

Thanks in advance for your help
ActiveDocument.UnProtect "mypassword"
ActiveWindow.View.ShadeEditableRanges  = false
'Still the old editable words highlighted with gray (problem when printing)

Open in new window

Comment
Watch Question

Commented:
I found the solution, so I want to share it with you and close this question.
Actually I do loop within all th bookmarks and remove the permission everyone, so the problem was solved. see code below

ForEach mb as BookMark in my document.bookmarks 'All my editable lines are bookmark
 If bm.Range.Editors.Item(1).Name = "Everyone" Then
    bm.Range.Editors(1).Delete
 End If

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.