OFF97: Exception Error When You Reference Application Object on a Microsoft Windows NT 4.0-based Computer (161332)
The information in this article applies to:
- Microsoft Office 97 for Windows, when used with:
- the operating system: Microsoft Windows NT
- Microsoft Access 97
- Microsoft Excel 97 for Windows
- Microsoft PowerPoint 97 for Windows
This article was previously published under Q161332 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
When you reference the Application object of an Automation server, such as Microsoft Access 97, Microsoft Excel 97, or Microsoft Word 97, you may receive the following Dr. Watson error message on a computer that is running Microsoft Windows NT 4.0, Service Pack 1:
An Application error has occurred and an application log is being generated.
MSACCESS.exe
Exception: (0x000006e6), Address: 0x77e2f4c7
The error message includes a reference to the executable file for the application that was running the Automation code, in this instance, Msaccess.exe.
In Microsoft PowerPoint 97, you may receive the following error message:
PowerPoint found an error that it can't correct.
You should save your presentations, exit and then restart
PowerPoint.
CAUSEMicrosoft has confirmed that this is a problem in Microsoft NT version 4.0,
Service Pack 1. RESOLUTION
This problem occurs only on a computer that is running Microsoft Windows NT 4.0, Service Pack 1.
To resolve this problem, obtain the latest service pack for Windows NT 4.0. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack
NOTE: If you intend to install the Service Release for Office 97, you must first upgrade your system to Windows NT Service Pack 2 or later.
WORKAROUND
To temporarily work around this problem, change your code to use late binding. Late binding occurs when you declare a variable as an object rather than as an application, for example:
Sub XLTest()
Dim xlApp as Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "c:\Program Files\Microsoft " _
& "Office"\Office\Examples\Samples.xls"
End Sub
REFERENCES
For more information about creating Automation objects, click Contents and Index on the Help menu, click the Index tab in Help, type the following text and then double-click the selected text to go to the "CreateObject function" topic. If you are unable to find the information you need, ask the Office Assistant.
For more information about Office Automation, please visit the Office Development support site at the following Microsoft Web site:
Modification Type: | Minor | Last Reviewed: | 8/23/2005 |
---|
Keywords: | kberrmsg kbprb KB161332 |
---|
|