Article ID: 169565
Article Last Modified on 1/25/2005
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 3.0b Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 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.
RESOLUTION
To 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.
STATUS
Microsoft 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
Keywords: kberrmsg kbfix kbvs97sp1fix kbvs97sp2fix kbprb KB169565