LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default trying to DDE from Excel to Word using DDEInitiate

I am trying to establish a DDE link between my Excel process and a Word
process.

Even thought I have openned Word I can't seem to be able to create a
channel. Here is my code in VB.

I am using Office 2000 on WindowsXp Pro.

I did executed the following Macro and Winword|System is listed among
available processes but channelNumber in AppelFrame is always 0.

Sub Initiate_DDE()
Dim ChanNum As Long

ChanNum = Application.DDEInitiate("", "")

End Sub

Any help appreciated.
__________________________________________________ ______________________________

Public Function AppelFrame() As Boolean

Dim channelNumber As Long, returnList As Variant, i As Integer
Dim err_no As Integer

On Error GoTo Err_AppelFrame

AppelFrame = False
channelNumber = Application.DDEInitiate( _
app:="Winword", topic:="System")
If channelNumber Then
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

AppelFrame = True
Else
err_no = DDEAppReturnCode()
End If

Exit_AppelFrame:
Exit Function

Err_AppelFrame:
MsgBox Err.Description
AppelFrame = False
Resume Exit_AppelFrame:
End Function


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DDEInitiate inconsistent... Jeff Brush Excel Programming 0 January 12th 05 08:42 PM
ddeinitiate Hangs Ann Excel Programming 0 September 7th 04 03:17 PM
DDEInitiate hangs Ann Excel Programming 1 August 6th 04 04:58 PM
Excel VBD DDEInitiate problem bbombardier Excel Programming 2 April 22nd 04 05:22 PM
DDEInitiate with Notepad Kevin Excel Programming 4 October 15th 03 08:35 PM


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"