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

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