Running Powerpoint macro from Windows application

  • Thread starter Thread starter Aerojade
  • Start date Start date
A

Aerojade

I have created a Module in a PPT File call Module1 and inside that i have a
function names Function1.

I am creating a Windows application in C# in VS 2005. How i can i call this
macro function after the File has been opened inside the application. Please
help.
 
Does the function Function1() take any parameters? Does it return any
values?

If answer to both the above questions is NO, the following code would do the
job:

object[] dummy = new object[1] { 0 };
PPTApp.Run("PPTFileName!Function1", ref dummy);

If the answer to any of the above question is YES, a bit different code
would be required to pass the parameters and receive the return value.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
 
OK...i got it working.... Thanks a lot...was missing that PPTFilename before
the name of the Macro
 
Back
Top