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: 29
Default Running a Powerpoint Macro from Excel

I am atempting to exacute a PPT macro from inside excel. Does anyone
have a sugestion on how to do this. I am running office 2003 on an XP
machine. All files I am working with are in the same directory.

I have found the following code that is suposed to work but dosn't...

The first one errors out because it can not seem to open the PPT file.

Sub PPTTest()
Dim PPT as Object

Set PPT = CreateObject("PowerPoint.Application")

PPT.Presentations.Open "C:\My Documents\PPTAutomation.ppt", ,
,False

' Note that the file name and the module
' name are required to path the macro correctly.
PPT.Run "PPTAutomation.ppt!Module1.AutomationTest"

End Sub


The second example is used by creating an add-in in PPT and then
calling the add in from Excel but is unable to reference the object.

Sub mymacro()
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation

Set PPApp = CreateObject("Powerpoint.Application")

PPApp.AddIns.Application.Run ("GetReturnValue")


End Sub

I'm open to any sugestions you might have. Thanks
Steve

 
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
Using PowerPoint to Call Excel/Macro? Losse Excel Discussion (Misc queries) 0 July 20th 05 03:00 PM
Running Powerpoint from Excel Naveen Sukhramani Excel Programming 3 August 1st 04 07:26 PM
excel to powerpoint via macro montoya Excel Programming 1 July 12th 04 06:12 PM
Macro not executed Excel -- PowerPoint rick_deacha Excel Programming 0 February 24th 04 04:55 PM
passing variables from an excel macro to a powerpoint macro jake Excel Programming 1 December 11th 03 02:36 AM


All times are GMT +1. The time now is 10:32 AM.

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"