H
Hugo Faber
Hi,
I have previously done a post in some under newsgroups.
My problem is as follows:
- I have an VB6 application wshich is able to generate reports using
Word automation
- Early binding has been used
- Reference in the VB6 project is made to Word 8 library (msword8.olb)
- The report generation runs well on my machine (Office 2003).
- The application doesnt run well on 2 other machines (office 97 and
Office 2000).
I got an automation error 5 ("invalid procedure call or argument") on
both machines at the same lines in my code,
with Range.Find do
...
....
.Execute Replacement:=wdReplaceAll => error 5
...
wend
and
...
moDocument.TablesOfContents(1).Update => error 5
Does anyone has experience with this error? I have learned that a
trick to eliminate error 5 is to add a DoEvents statement before the
failing Word automation statement. Does anyone has experience with
that?
I have also discovered that a DLL containing the Word automation part
had been still compiled with symbolic debug information, so I have
recompiled my application. Could this make any difference in the
runtime behavior wrt Word automation?
Best regards,
Hugo
I have previously done a post in some under newsgroups.
My problem is as follows:
- I have an VB6 application wshich is able to generate reports using
Word automation
- Early binding has been used
- Reference in the VB6 project is made to Word 8 library (msword8.olb)
- The report generation runs well on my machine (Office 2003).
- The application doesnt run well on 2 other machines (office 97 and
Office 2000).
I got an automation error 5 ("invalid procedure call or argument") on
both machines at the same lines in my code,
with Range.Find do
...
....
.Execute Replacement:=wdReplaceAll => error 5
...
wend
and
...
moDocument.TablesOfContents(1).Update => error 5
Does anyone has experience with this error? I have learned that a
trick to eliminate error 5 is to add a DoEvents statement before the
failing Word automation statement. Does anyone has experience with
that?
I have also discovered that a DLL containing the Word automation part
had been still compiled with symbolic debug information, so I have
recompiled my application. Could this make any difference in the
runtime behavior wrt Word automation?
Best regards,
Hugo