Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDeInitiate between PowerPoint and Excel

Status
Not open for further replies.

Chido

Technical User
Jun 27, 2003
1
US
I'm trying to initiate a call between a PowerPoint and Excel File with the goal of eventually sending graphs from a excel file to various locations in a PowerPoint file. Following code already introduced on the site, I came up with the following. Unfortunately, I can't establish a connection between PowerPoint and Excel. I can do so between Word and Excel, but the PowerPoint option remains out of reach.

Here is the code I'm "struggling" with
*****************
Option Explicit

Const ShellNormFocus = 1
Const ShellMinFocus = 2
Const ShellMaxFocus = 3
Const ShellNormNoFocus = 4
Const ShellMinNoFocus = 6

Dim ddeChannel As Integer

Sub ExcelPowerPointChannel()
'This procedure opens a channel between Excel and PowerPoint

Const lTitle = "Open DDE Channel"

On Error GoTo BadConnection

Shell PathName:="C:\Program Files\Microsoft Office\Office\PowerPNT.EXE", _
WindowStyle:=ShellMinNoFocus


ddeChannel = DDEInitiate(App:="PowerPNT", Topic:="System")

MsgBox prompt:="A channel to PowerPoint is now open.", _
Buttons:=vbInformation, Title:=lTitle
Exit Sub

BadConnection:
MsgBox prompt:="A channel to PowerPoint not opened.", _
Buttons:=vbExclamation, Title:=lTitle


End Sub
**************

Any help would be much appreciated.

El "Chido"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top