>Unfortunately, I didn't manage to make it work. Adapting the sample code, I wrote the following:
>
>
>This.oDoc.Sections(1).Headers(1).Range.Find.Execute(tcFindText, .F., .F., .F., .F., .F., .T., 1, .F., tcReplaceText, 2)
>
>
>Where This.oDoc is a reference to the current document, and tcFindText contains a text that actually occurs in the header.
>
>After trying a few other combinations, I found that the above command doesn't give any error message... but it doesn't replace anything, either. Any ideas, what I might be doing wrong? Using Word 2003, by the way.
>
>TIA,
>
>Hilmar.
I tried to find a way to fire a "Record macro" in Word 2007 and was unable to, so I gave up this problem for now. I'll try tomorrow.
If it's not broken, fix it until it is.
My Blog