Microsoft KB Archive/160251

= BUG: "Invalid Page Fault" After OLE Automation with WordPerfect =

Article ID: 160251

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q160251



SYMPTOMS
The following error occurs after you make an OLE Automation call to Corel WordPerfect 7.0:

VFP.EXE Caused an Invalid Page Fault in module OLEAUT32.DLL



CAUSE
WordPerfect is attempting to send a return value to Visual FoxPro.



WORKAROUND
Use an assignment statement to call the object methods.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
Corel WordPerfect 7.0 does allow OLE Automation. In Visual FoxPro, you can use the CreateObject command to create a reference to a WordPerfect object, but you will still get the error when you try to call any of its methods.

Steps to Reproduce Behavior
Type the following commands in the Visual FoxPro Command window: oWP = CREATEOBJECT("WordPerfect.PerfectScript") oWP.FileNew WordPerfect 7.0 actually creates a new document before Visual FoxPro generates an error.

To work around the problem, change the last command to the following: result = oWP.FileNew

Keywords: kberrmsg kbbug kbinterop kb3rdparty KB160251

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.