WordBasic Error Code 500: Cannot Initiate Link Using DDELast reviewed: July 30, 1997Article ID: Q95107 |
The information in this article applies to:
SUMMARYIn Word for Windows, the WordBasic Error Code Number 500, "Cannot initiate link," indicates the macro program cannot initiate a DDE link. The syntax is as follows:
ChanNum = DDEInitiate(App$,Topic$)The above line opens a DDE channel to an application. App$ is the application name defined by the other application. Topic$ describes something in the application you are accessing, usually the document containing the data you want to use. The following is an example:
App$ = "C:\Excel" Topic$ = "C:\Excel\Sales.Xls" ChanNum = DDEInitiate(App$,Topic$)When this command is executed, the error is displayed. This error occurs when the application parameter being passed contains only a path to the application. Despite the error, the link is established. The error message "Cannot initiate link" will not be issued when the path to the file is designated in the file information section of the ChanNum statement. For example, the following will not produce the error:
Sub MAIN REM Launches Excel if not running Shell "C:\Excel\Excel.exe" REM Initiates DDE link ChanNum1 = DDEInitiate("C:\EXCEL","C:\EXCEL\EXPENSES.XLS") REM Terminates all DDE links DDETerminateAll End SubFor more information on DDE, please refer to the "Microsoft Word for Windows Technical Reference" (Word for Windows versions 1.0-2.0c), and the "Microsoft Word Developers Kit" (Word for Windows versions 6.0-7.0). For additional information on the WordBasic shell command, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q102019 TITLE : WordBasic Shell Command Doesn't Wait for Application to FinishWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
|
KBCategory: kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |