Application.DDETerminate Method (Word)

Closes the specified dynamic data exchange (DDE) channel to another application.

Syntax

expression .DDETerminate(Channel)

expression A variable that represents an Application object. Optional.

Parameters

Name

Required/Optional

Data Type

Description

Channel

Required

Long

The channel number returned by the DDEInitiate method.

Remarks

Security noteSecurity Note
Dynamic data exchange (DDE) is an older technology that is not secure. If possible, use a more secure alternative to DDE, such as object linking and embedding (OLE).

Example

This example creates a new workbook in Microsoft Excel and then terminates the DDE conversation.

Dim lngChannel As Long 
 
lngChannel = DDEInitiate(App:="Excel", Topic:="System") 
DDEExecute Channel:=lngChannel, Command:="[New(1)]" 
DDETerminate Channel:=lngChannel

See Also

Concepts

Application Object Members

Application Object