Export (0) Print
Expand All

Application.DDEInitiate Method

Office 2007
Opens a DDE channel to an application.

Syntax

expression.DDEInitiate(App, Topic)

expression   A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
AppRequiredStringThe application name.
TopicRequiredStringDescribes something in the application to which you're opening a channel — usually a document of that application.

Return Value
Long

Remarks

If successful, the DDEInitiate method returns the number of the open channel. All subsequent DDE functions use this number to specify the channel.

Example

This example opens a channel to Word, opens the Word document Formletr.doc, and then sends the FilePrint command to WordBasic.

Visual Basic for Applications
channelNumber = Application.DDEInitiate( _
    app:="WinWord", _
    topic:="C:\WINWORD\FORMLETR.DOC")
Application.DDEExecute channelNumber, "[FILEPRINT]"
Application.DDETerminate channelNumber



Community Additions

ADD
Show:
© 2014 Microsoft