Running Powerpoint macro from Windows application

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.
 
C

Chirag

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
 
A

Aerojade

OK...i got it working.... Thanks a lot...was missing that PPTFilename before
the name of the Macro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top