Microsoft KB Archive/96352

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Visual FoxPro for Windows, versions 3.0, 5.0
 * Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SUMMARY
The following code example shows how to link Microsoft FoxPro for Windows to Microsoft Word for Windows. This code sets up the dynamic data exchange (DDE) link, opens a Word for Windows file (CONVINFO.DOC) that is installed with Word, and terminates the link. This is a good test for a DDE link and can be run through the Trace window in FoxPro for Windows.

RUN /N C:\WINWORD\WINWORD.EXE  && Starts Word iCHANNEL= DDEInitiate(&quot;WinWord&quot;, &quot;System&quot;) =DDEExecute (iCHANNEL,'[FileOpen&quot;C:\WINWORD\CONVINFO.DOC&quot;]') * Opens doc installed with Word =DDETerminate(iCHANNEL) This code does not close Word for Windows; it simply terminates the link between the two programs.

MORE INFORMATION
If you are using FoxPro for Windows version 2.x, you can refer to the additional sample code in the FOXPROW\SAMPLES\DDE subdirectory.