Microsoft KB Archive/130302

= PRB: OLE Word 6 Object Does Not Close Itself in Windows NT =

Article ID: 130302

Article Last Modified on 2/10/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q130302



SYMPTOMS
In the operating environment of Windows NT version 3.5, when you navigate through Visual FoxPro and activate Microsoft Word 6.0 for Windows (the 16- bit version) to edit a "bound" object, the instance of Word does not quit when you skip to the next record or quit Visual FoxPro.



CAUSE


WORKAROUND
The only way to quit the instance of Word is to use PVIEWER.EXE (a program provided with the Windows NT Resource Kit) to kill the "NTVDM" process (the Windows NT 16-bit applications process).



STATUS
Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
On a system running Windows NT version 3.5, Workstation:

 From the Windows file manager, copy one of the Word 16 templates to the Word startup directory. For example, copy PRESENT1.DOT to the C:\WORD16\STARTUP directory. In Visual FoxPro, create a table named Testword.dbf that has PRESENT1.DOT as an embedded Word Object in a general field. The easiest way to do this is to follow these steps:

  In the Command window, enter the following command: CREATE TABLE Testword (gfield1 g)                                Open the Testword table in a Visual FoxPro work area. Browse the table, and use the APPEND command to add a blank record to the table.</li> Press ALT+TAB to return to Program Manager. Then start Microsoft Word.</li> In Word, open the PRESENT1.DOT document. This .DOT file is an empty template.</li> Select the entire document. Then from Word's Edit menu, choose Copy to copy the document to the clipboard.</li> Close Word.</li> Return to Visual FoxPro.</li> Browse the Testword table. Double-click gfield1. An empty edit window will appear.</li> From the Edit menu, choose Paste to copy the contents of PRESENT1.DOT from the clipboard into gfield1. Double-click the empty window. Enter some text in the field so it can be seen.</li> Save gfield1. Append two more empty records to the table.</li></ol> </li>  In Visual FoxPro, create a form that has an OLE bound control that is bound to the general field in the table created in step 2. Then add a command button to the form. Add the following commands to the Click method of the command button: SKIP THISFORM.Refresh </li> Close and save the form as TESTWORD.SCX.</li> Press CTRL+ESC to open the Task Manager. Close all the processes in Windows NT except Visual FoxPro, Program Manager, and File Manager.</li> Go to File Manager. Start PVIEWER.EXE from the WINDOWS\RESKIT directory. A dialog box titled "Process Viewer" is presented. All of the processes currently active in Windows NT are listed in alphabetical order. Notice that there is no process named "NTVDM..."</li> Press ALT+TAB to return to Visual FoxPro.</li> If it is not still open, open the TESTWORD.DBF table.</li> Run the TESTWORD.SCX form by typing DO FORM Testword command in the Command window.</li> Double-click the gfield1 OLE object. Word opens for "in place activation." Press ALT+TAB to switch to the Process Viewer window. Note that an entry for "NTVDM..." has been added to the process list. Switch back to Visual FoxPro.</li> <li>Save gfield1, and click the command button to move to the next record.</li> <li>Press ALT+TAB to switch to the Process Viewer window. Notice that there is still an entry for "NTVDM..."</li> <li>Switch back to Visual FoxPro. Quit Visual FoxPro.</li> <li>Return to the Process Viewer. The entry for NTVDM is still there. Select it with the mouse, and click the Kill Process button.</li></ol>

Additional query words: VFoxWin 3.00 bound OLE Windows NT hang winword

Keywords: KB130302

-

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

© Microsoft Corporation. All rights reserved.