Share via


Application.DDETerminate Method

Word Developer Reference

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  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.

Visual Basic for Applications
  Dim lngChannel As Long

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

See Also