calvertnr
02-26-2018, 08:44 AM
Word 2016
I need to replace the legacy form field checkboxes with content control checkboxes.
I have never written any macros, please excuse my ignorance. We have old checklists that I want to update. I have my feeble attempt at code below. Example document is attached. There may be a better way to fix this.
Sub ChkBxTab()
Dim i As Long
With ActiveDocument
For i = .FormFields.Count To 1 Step -1
With .FormFields(i)
If .Type = wdFieldFormCheckBox Then
Set Rng = .Range
.Delete
Rng = wdContentControlCheckBox
End If
End With
Next
End With
End Sub
Any help is appreciated!
I need to replace the legacy form field checkboxes with content control checkboxes.
I have never written any macros, please excuse my ignorance. We have old checklists that I want to update. I have my feeble attempt at code below. Example document is attached. There may be a better way to fix this.
Sub ChkBxTab()
Dim i As Long
With ActiveDocument
For i = .FormFields.Count To 1 Step -1
With .FormFields(i)
If .Type = wdFieldFormCheckBox Then
Set Rng = .Range
.Delete
Rng = wdContentControlCheckBox
End If
End With
Next
End With
End Sub
Any help is appreciated!