You may receive the "Run-time error '-2147023174' (800706ba)" error message or the "Run-time error '462'" when you run Visual Basic code that uses Automation to control Word in Office XP Developer and in Office 2000 Developer (189618)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Visual Basic Standard Edition for Windows 4.0
- Microsoft Visual Basic for Applications 5.0
- Microsoft Office XP Developer
- Microsoft Office 2000 Developer
- Microsoft Word 2002
- Microsoft Word 2000
- Microsoft Word 97 for Windows
This article was previously published under Q189618 SYMPTOMS
When you run Microsoft Visual Basic code that uses Automation to control Microsoft Word 97, Word 2000, and Word 2002, you may receive one of the following error messages: Error message 1
Run-time error '-2147023174' (800706ba)
Automation error
Error message 2
Run-time error '462': The remote server machine does not exist or is
unavailable
CAUSE
Visual Basic has established a reference to Word due to a line of code
that calls a Word object, method, or property without qualifying it with
a Word object variable. Visual Basic does not release this reference
until you end the program. This errant reference interferes with automation
code when the code is run more than once.
RESOLUTION
Modify the code so that each call to a Word object, method, or property
is qualified with the appropriate object variable.
STATUS
This behavior is by design.
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
178510
PRB: Excel Automation Method of Object '_Global'Failed
167223
Microsoft Office 97 Automation Help File Available
For additional information about the Automation of Office applications, click the article number below
to view the article in the Microsoft Knowledge Base:
222101 HOWTO: Find and Use Office Object Model Documentation
Modification Type: | Major | Last Reviewed: | 3/8/2005 |
---|
Keywords: | kberrmsg kbProgramming kbAutomation kbprb KB189618 |
---|
|