PRB: Opening an Embedded Word 97 Document Creates an Extra Doc

ID: Q176061

The information in this article applies to:


When opening an embedded Microsoft Word 97 object in a separate application window, you get an extra blank document. This happens the second and any subsequent times you open the embedded document during your applications session. Trying to close the dummy document after closing the embedded document will cause the following error:

on Windows NT:

File: Winword.exe - Application Error
on Windows 95 or Windows 98:
This Program has preformed an illegal operation


Microsoft Word will display a blank dummy document the second and any subsequent times you open an embedded Word 97 document stored in an OLE control.

This behavior does not occur in Word 2000. This is because Word 2000 is implemented as an SDI application where each document is hosted in its own main window.

Steps to Reproduce Behavior

  1. Create a new Standard EXE project. Form1 is created by default.

  2. Add an OLE control to Form1.

  3. From the Insert Object dialog box, choose Create New. From the Object Type list, select Microsoft Word Document.

  4. Enter some text in the embedded Word Document.

  5. Click elsewhere on the form to deselect the OLE control.

  6. Press the F5 key to run the project.

  7. Right-click on the OLE control and choose OPEN.

    NOTE: This can also be done in code by issuing a DoVerb -2 on the OLE control. For example: OLE1.DoVerb 2.

  8. After Word starts, select Close and Return to Unnamed from the File Menu.

  9. Repeat steps 7 and 8. You will now see a blank Document1.

  10. Close the Document1 window in Word and note that you receive one of the errors described at the beginning of this article.

Additional query words: word97 word 8.0

Keywords          : kbVBp kbVBp400 kbVBp500 kbVBp600 kbWord 
Version           : WINDOWS:4.0,5.0,6.0,97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: June 8, 1999