My purpose is simply to replace each series of underscores in a would-be form document (between 3 and 6, for instance; I tried with 4 here) with a legacy checkbox. I have recorded two macros but don't know how to insert the relevant part of the first (inserting a checkbox) into the second.
In the code below, the replacement line with the $ is undoubtedly extraneous; I was trying to see the macro language in case it would help me in substituting the checkbox for the $.
Code:
Sub Box()
'
' Box Macro
'
'
Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormCheckBox
Selection.TypeText Text:=" "
End Sub
Sub BoxA()
'
' BoxA Macro
'
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "____"
.Replacement.Text = "$"
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Thanks in advance.