I need to run a PowerPoint sub from a sub in Excel. The reason is that most PowerPoint actions run far faster and with less errors when run from a sub in PowerPoint than when run from a sub in Excel.
I am trying to use Application.Run(Macroname_As_String)
where I use PptApp
in place of Application
and PptApp
is loaded as:
Dim PptApp As PowerPoint.Application
Set PptApp = CreateObject("PowerPoint.Application")
I tried referring to the VBA script as both Presentation1.pptm!UpdateOLELinks
and UpdateOLELinks
ie. file and VBA script / just VBA script.
I get the error :
"Method 'Run' of object '_Application' failed".
My VBA script UpdateOLELinks
is located in Module1
of Presentation1
.
Any Ideas?
Set Ppt1 = PptApp.Presentations.Open(PptPath, msoFalse, msoTrue, msoTrue)
. – lolxorRun
method in powerpoint require parameters : msdn.microsoft.com/fr-fr/library/office/Ff744221.aspx So try something like :PptApp.Run Macroname_As_String, Parameters_As_Array
, even if you pass an empty array! – R3uKPptApp.Run Module_Name.Macroname_As_String, Parameters_As_Array
– R3uK