"Type Mismatch" error message in Visual FoxPro when using OLE automation to automate Word 97 (169565)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q169565 SYMPTOMS
When using OLE automation to interact with Microsoft Word 97 and the Visual
Basic for Applications language, certain commands return the following
error to Visual FoxPro:
OLE error code 0x80020005: Type Mismatch.
CAUSE
This problem is caused by a problem in the way Word 97 returns mismatched
errors from the OLE DISPATCH methods.
RESOLUTIONTo resolve this problem, use one of the following methods:
- Use the equivalent Word.Basic methods with the WordBasic property
within the Word.Application object. See the example below.
- Use only the Word.Basic object.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
This bug was corrected in Visual Studio 97 Service Pack 2.
For additional information about Visual Studio 97 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
170365
Visual Studio 97 service packs - what, where, and why
REFERENCES
Microsoft Word for Windows 97 on-line help. Visual Basic for Applications
help that shipped with Word for Windows version 97.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
169547
Some OLE automation commands fail with Visual Fox Pro 5.x
(c) Microsoft Corporation 1997, All Rights Reserved.
Contributions by Dean Christopher, Microsoft Corporation
Modification Type: | Major | Last Reviewed: | 1/25/2005 |
---|
Keywords: | kberrmsg kbfix kbprb kbVS97sp1fix kbVS97sp2fix KB169565 kbAudDeveloper |
---|
|