N
notmeg
Hello,
I have a macro that is designed to change the font size and color of
the form fields in a protected form. It basically unprotects the form,
applies the changes, then reprotects. The problem is that sometimes,
when the user types more into a form field after making the change, the
new text is in the default font size/color. The behavior is really
weird, it seems to only happen if you start typing after the first
carriage return in a field, and even then it's intermittent. I've tried
making the change using a style instead, but that seemed to have no
effect. Here's the code I'm using to make the font color/size change:
For Each oSection In oDoc.Sections
For Each FmFld In oSection.Range.FormFields
If FmFld.Type = wdFieldFormTextInput Then
If strFontSize <> "" Then
FmFld.Range.Font.Size = strFontSize
End If
FmFld.Range.Font.Color = strColor
End If
Next
Next
Any ideas why this could be happening?
Thanks in advance!
I have a macro that is designed to change the font size and color of
the form fields in a protected form. It basically unprotects the form,
applies the changes, then reprotects. The problem is that sometimes,
when the user types more into a form field after making the change, the
new text is in the default font size/color. The behavior is really
weird, it seems to only happen if you start typing after the first
carriage return in a field, and even then it's intermittent. I've tried
making the change using a style instead, but that seemed to have no
effect. Here's the code I'm using to make the font color/size change:
For Each oSection In oDoc.Sections
For Each FmFld In oSection.Range.FormFields
If FmFld.Type = wdFieldFormTextInput Then
If strFontSize <> "" Then
FmFld.Range.Font.Size = strFontSize
End If
FmFld.Range.Font.Color = strColor
End If
Next
Next
Any ideas why this could be happening?
Thanks in advance!