Application.DDERequest Method (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

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

expression .DDERequest(Channel, Item)

expression A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

Channel

Required

Long

The channel number returned by the DDEInitiate method.

Item

Required

String

The item to be requested.

Return Value

Variant

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.

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: