Share via


Application.DDEPoke Method (Excel)

Sends data to an application.

Syntax

.DDEPoke(Channel, Item, Data)

A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

Channel

필수

Long

The channel number returned by the DDEInitiate method.

Item

필수

Variant

The item to which the data is to be sent.

Data

필수

Variant

The data to be sent to the application.

Remarks

An error occurs if the method call doesn't succeed.

Example

This example opens a channel to Word, opens the Word document Sales.doc, and then inserts the contents of cell A1 (on Sheet1) at the beginning of the document.

channelNumber = Application.DDEInitiate( _ 
 app:="WinWord", _ 
 topic:="C:\WINWORD\SALES.DOC") 
Set rangeToPoke = Worksheets("Sheet1").Range("A1") 
Application.DDEPoke channelNumber, "\StartOfDoc", rangeToPoke 
Application.DDETerminate channelNumber

참고 항목

개념

Application Object

Application Object Members