![]() |
#4
|
|||
|
|||
![]()
Sub Protect_Form_Fields_2()
' ' Protect_Form_Fields_2 Macro ' ' Dim i As Long Dim startPos As Integer Dim endPos As Integer With ActiveDocument For i = 1 To .ContentControls.Count Set ContentControl = .ContentControls(i) startPos = ContentControl.Range.Start - 1 endPos = ContentControl.Range.End + 1 Application.ActiveDocument.Range(startPos, endPos).Editors.Add WdEditorType.wdEditorEveryone Next i .Protect Password:="NoChange", NoReset:=False, Type:= _ wdAllowOnlyReading, UseIRM:=False, EnforceStyleLock:=False End With End Sub |
Tags |
msword, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
BruceM | Word | 5 | 10-06-2016 08:26 AM |
Macro to keep formatted form fields after mail merge or replace text with formatted form fields | jer85 | Word VBA | 2 | 04-05-2015 10:00 PM |
Using MSWord 2003 docs in MSWord 2010 | Joe Watson | Word | 7 | 05-31-2014 11:27 AM |
![]() |
2surgeons | Word | 4 | 03-05-2012 07:19 PM |
![]() |
LAssist2011 | Word | 5 | 12-14-2011 03:02 PM |