?
Solved

Protect Document - Remove Editing Restrictions

Posted on 2009-02-12
1
Medium Priority
?
1,547 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

0
Comment
Question by:fakoua
1 Comment
 
LVL 1

Accepted Solution

by:
fakoua earned 0 total points
ID: 23632914
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

0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question