I have a program coded in VB 6.0, and when the user clicks on a button, it opens up a document in word, the code in the click event looks like this:
Dim objWord As Word.Application
Dim strMessage As String
Dim intResult As Integer
If bFileExists(gStrText) Then
Set objWord = New Word.Application
objWord.Visible = True
objWord.Documents.Open gStrText
End If
Pretty straightforward. The problem is that it works like a charm with machines loaded with Windows NT 4.0, but when we run it on Windows 2000 machines, we get an error that says:
Run-time Error -2147024894(80070002)
Automation Error
The System Cannot find the file specified.
It's a VBOK messagebox, and clicking on OK kills the entire application. Has anyone seen anything like this before? BTW: The same app can call Excel without any problems. In both cases, Word and Excel are version '97. I have verified that the Microsoft Word 8.0 Component Library (MSWORD8.OLB) is an included component. When I step through the project, it appears that the variable objWord never gets set. VB always reports it's value as "nothing", even after the "set" statement.
Dim objWord As Word.Application
Dim strMessage As String
Dim intResult As Integer
If bFileExists(gStrText) Then
Set objWord = New Word.Application
objWord.Visible = True
objWord.Documents.Open gStrText
End If
Pretty straightforward. The problem is that it works like a charm with machines loaded with Windows NT 4.0, but when we run it on Windows 2000 machines, we get an error that says:
Run-time Error -2147024894(80070002)
Automation Error
The System Cannot find the file specified.
It's a VBOK messagebox, and clicking on OK kills the entire application. Has anyone seen anything like this before? BTW: The same app can call Excel without any problems. In both cases, Word and Excel are version '97. I have verified that the Microsoft Word 8.0 Component Library (MSWORD8.OLB) is an included component. When I step through the project, it appears that the variable objWord never gets set. VB always reports it's value as "nothing", even after the "set" statement.