Invalid Page Fault Running VB Macro in Hidden Word Session

Last reviewed: February 5, 1998
Article ID: Q135082
7.00 WINDOWS
  kbprg kbcode

The information in this article applies to:
  • Microsoft Word for Windows 95, version 7.0

SYMPTOMS

If Word is not running and you run a Visual Basic for Applications macro that attempts to call Word, you may receive the following error message:

   This program has performed an illegal operation and will be shut down.
   If the problem persists, contact the program vendor.

   Winword caused an invalid page fault in module Winword.exe at
   0137:50013cc2.


STATUS

Microsoft has confirmed this to be a problem in Word for Windows 95 version 7.0. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This problem does not occur in Microsoft Word 97.

WORKAROUND

Start Word before you run the Visual Basic for Applications macro.

MORE INFORMATION

The following macro demonstrates the problem.

When you run the following macro in Microsoft Excel

   Sub test()
      Dim w as object
      Set w=CreateObject("Word.Basic")
      w.FileNew
      w.FilePrintPreview
   End Sub

you will receive an error message if Word is closed.


KBCategory: kbprg kbcode
KBSubcategory: kbole

Additional reference words: 7.00 word95 ole automation macro excel95
word7 application error

Keywords : kbinterop kbole kbcode kbprg
Version : 7.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.