T
T Scott
I have a a VB5 application that fails with:
Automation Error No. -196859
This error ONLY happens when automating Word 2003 - The code works fine
with all other versions of Word.
The code (variables have been replaced with strings for illustration of this
example) that fails is:
objSelection.Find.Execute _
FindText:="[[ContactName]]", _
ReplaceWith:="<Attention>", _
replace:=wdReplaceAll
The error has been emulated on multiple machines with Windows XP and Word
2003 with the latest updates.
In the routine being executed there is a previous execution of the
"objSelection.Find.Execute" on the Content of the document. This first
execution works without error. Then the code executes the
"objSelection.Find.Execute" again on the first Header of the first Section
of the document. This is where the failure occurs.
The error occurs whether there is a target FindText in the header or not.
What could be causing this Automation Error?
TIA
Tony Scott
Automation Error No. -196859
This error ONLY happens when automating Word 2003 - The code works fine
with all other versions of Word.
The code (variables have been replaced with strings for illustration of this
example) that fails is:
objSelection.Find.Execute _
FindText:="[[ContactName]]", _
ReplaceWith:="<Attention>", _
replace:=wdReplaceAll
The error has been emulated on multiple machines with Windows XP and Word
2003 with the latest updates.
In the routine being executed there is a previous execution of the
"objSelection.Find.Execute" on the Content of the document. This first
execution works without error. Then the code executes the
"objSelection.Find.Execute" again on the first Header of the first Section
of the document. This is where the failure occurs.
The error occurs whether there is a target FindText in the header or not.
What could be causing this Automation Error?
TIA
Tony Scott