Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 1.37 KB

Excel.Application.DDEInitiate.md

File metadata and controls

58 lines (35 loc) · 1.37 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.DDEInitiate method (Excel)
vbaxl10.chm132090
vbaxl10.chm132090
Excel.Application.DDEInitiate
4b14e2ee-d7b0-a028-42a7-0809fa381f7e
04/04/2019
medium

Application.DDEInitiate method (Excel)

Opens a DDE channel to an application.

Syntax

expression.DDEInitiate (App, Topic)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
App Required String The application name.
Topic Required String Describes something in the application to which you are 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.

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

[!includeSupport and feedback]