We've misspelled THAT in our help text in a gazillion form fields. Anybody got some code that will find and replace it for us??
We misspelled it as THART.
We've misspelled THAT in our help text in a gazillion form fields. Anybody got some code that will find and replace it for us??
We misspelled it as THART.
~Anne Troy
Are all of the forms fields in one document?
yep
~Anne Troy
I'm no Word Pro (like you!), But this worked!
Dim frmfld As FormField For Each frmfld In Me.FormFields frmfld.Result = Replace(frmfld.Result, " THART ", " that ", , , vbTextCompare) Next frmfld
Well, it sure LOOKED good.
But it didn't change anything. It's in the HELP TEXT of the form fields, not in the form fields.
Really looked cool, tho.
I actually ran this:
[vba]Option Explicit
Sub FixThart()
Dim frmfld As FormField
For Each frmfld In Me.FormFields
frmfld.Result = Replace(frmfld.Result, " THART ", " that ", , , vbTextCompare)
Next frmfld
End Sub[/vba]
~Anne Troy
OK, I missed the whole Help Text in the first post. Try this:
Dim frmfld As FormField For Each frmfld In Me.FormFields frmfld.HelpText = Replace(frmfld.HelpText, " THART ", " that ", , , vbTextCompare) Next frmfld
Loverly!!
~Anne Troy
You know it!Originally Posted by Dreamboat