E
Eric
Help, I'm using the following code to re-protect form fields in Odd Numbered
Sections. It works great except it is also resetting the form fields. Here
is the code that I am useing. Thanks for your help.
Sub reprotect()
Dim sPassword As String
For Each oSection In ActiveDocument.Sections
'If the section's index / 2 <> 0 (odd) protection needed'
If oSection.Index Mod 2 <> 0 Then
oSection.ProtectedForForms = True
Else
'no protection needed(even)'
oSection.ProtectedForForms = False
End If
Next
If lProtected <> wdNoProtection Then
sPassword = ""
ActiveDocument.Protect Type:=lProtected, NoReset:=True, Password:=""
End If
End Sub
Sections. It works great except it is also resetting the form fields. Here
is the code that I am useing. Thanks for your help.
Sub reprotect()
Dim sPassword As String
For Each oSection In ActiveDocument.Sections
'If the section's index / 2 <> 0 (odd) protection needed'
If oSection.Index Mod 2 <> 0 Then
oSection.ProtectedForForms = True
Else
'no protection needed(even)'
oSection.ProtectedForForms = False
End If
Next
If lProtected <> wdNoProtection Then
sPassword = ""
ActiveDocument.Protect Type:=lProtected, NoReset:=True, Password:=""
End If
End Sub