In VB6, users occasionally receive this error and I am unable to reproduce it.
Run-Time Error '5': Invalid Procedure Call or Argument
I am referencing the "MSWord 10 Object Library" and sometimes this error occurs at some point after the application has opened MSWord 2002. However, this app has referenced the MSWord 10 Object Library for years, and this error just started occurring in the last few months.
The code is shelling the app using the following:
Dim app As Word.Application = GetObject("", "Word.Application")
I am assuming I have introduced a bug somewhere, but no idea what might be causing it. The error does not occur very often and cannot be reproduced by a user when I am standing there. The error forces the app to totally shut down.
Users are running Windows XP. The user reporting the issue the most is running the app thru Citrix. There are 350 total users, about 100 use the app thru Citrix.
Any ideas on how fix the error?