DDETerminate Method

Microsoft Excel Visual Basic

Closes a channel to another application.

expression.DDETerminate(Channel)

expression    Optional. An expression that returns an Application object.

Channel    Required Long. The channel number returned by the DDEInitiate method.

Example

This example opens a channel to Word, opens the Word document Formletr.doc, and then sends the FilePrint command to WordBasic.

channelNumber = Application.DDEInitiate( _
    app:="WinWord", _
    topic:="C:\WINWORD\FORMLETR.DOC")
Application.DDEExecute channelNumber, "[FILEPRINT]"
Application.DDETerminate channelNumber