This documentation is archived and is not being maintained.

Application.DDERequest Method

Office 2007
Requests information from the specified application. This method always returns an array.

Syntax

expression.DDERequest(Channel, Item)

expression   A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
ChannelRequiredLongThe channel number returned by the DDEInitiate method.
ItemRequiredStringThe item to be requested.

Return Value
Variant

Example

This example opens a channel to the System topic in Word and then uses the Topics item to return a list of all open documents. The list is returned in column A on Sheet1.

Visual Basic for Applications
channelNumber = Application.DDEInitiate( _
    app:="WinWord", _
    topic:="System")
returnList = Application.DDERequest(channelNumber, "Topics")
For i = LBound(returnList) To UBound(returnList)
    Worksheets("Sheet1").Cells(i, 1).Formula = returnList(i)
Next i
Application.DDETerminate channelNumber



Show: