#1
|
|||
|
|||
VBA - Document protection with exceptions
Hello,
we are using the protection function in word with "exceptions", so that users can only edit defined ranges. Is it possible to disable, or if not, to delete the exceptions ranges, so that we can have an final document at the end? Usually we would use the protectiontype wdallowonlyreading, but this is the same as required for the exceptions. If ActiveDocument.ProtectionType = wdNoProtection Then ActiveDocument.Protect Password:="", noReset:=False, Type:= _ wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False End If Thanks in advance! |
#2
|
||||
|
||||
If you aren't using passwords on your protection I would guess that the protection is just to stop accidental changes. If that is the case, I would do this a different way.
First, add Content Controls for each of the areas that you want to allow edits. Then to apply protection to everything else, do a Select All and group the content by going to Developer > Controls Group > Group > Group You can then run a macro to remove all Content Controls for delivery.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
You could use content controls for the editable space, then add 'editors' to those controls, then protect read only. See attached.
The simplest way to achieve this is with https://www.gmayor.com/insert_content_control_addin.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
You could also set the Content Controls to remove the content control when contents are edited. Of course that means that people get one shot at filling it in. That changes the CC to text.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help Customizing Document Protection | bgmsd | Word | 2 | 06-07-2015 07:31 AM |
Document enables protection after print | ubns | Word | 1 | 09-12-2012 06:33 PM |
Protection bounces user to top of document | aedmyr | Word | 2 | 04-13-2012 08:32 PM |
Document protection | Daved2424 | Word | 0 | 11-17-2010 01:22 AM |
need help with document protection | jknyc | Word | 1 | 06-22-2009 11:47 PM |