question on auto run macro in powerpoint

S

sujatha.kokkirala

Hello,

I understand that, auto_open and auto_close macros are fired when you
load/unload add-in, and when you open a ppt file, actually before the
file loads completely.
Is there a way I can implement a macro that can execute after the ppt
file is opened? like may be try to automatically print the file from
the macro?

Thankyou
 
B

Brian Reilly, MVP

Probably, but from your post we don't really know when you want to
fire this code. Check the PPTFAQ.com site and check into Events which
can be fired. Tell us more specifically what you want to do and when
and we can help better. There are events that can trigger other code
routines.

Brian Reilly, MVP
 
S

sujatha.kokkirala

 wrote:


It helps if you reply to an existing message rather than starting a new
"thread".  This way we're left to guess what "that" is.


By implementing an event handler, you could trigger a macro when the user goes
to a specific slide, as one example.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================

Thanks for your responses. I am sorry I wasn't clear.
Please refer to my earlier post:
http://groups.google.com/group/micr...read/thread/2b0be6f4feb14e17#60bf9549d31d1124

here's what I am trying to do:
As mentioned, I have created add-in (say test1.ppa) file, I load it, I
want to be able to run one of the macros in the ppa file from VC++.
I tried Application.Run(ppaName!ModuleName.MacroName), it doesn't
work. I am not sure if the syntax and arguments are correct.

If I can not do it from vc++, is it possible to create another add-in
say test2.ppa, have a event handler that can run macro in test1.ppa?
Thanks again. I really appreciate your help.
 
S

sujatha.kokkirala

This works from one addin to another:

Sub Test()
    Application.Run ("addin_name" & "!" & "sub_name")
    ' where addin_name is the name of the addin as it appears in Tools, Addins
    '       sub_name is the name of the subroutine you want to invoke
    '       both can be literal strings or string variables
End Sub

Not sure how you'd do it from VC++, I'm afraid.
Try separating the module name and macroname with ! rather than .
They're strings, and not properties, of course.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================- Hide quoted text -

- Show quoted text -

Thankyou Steve. I really appreciate your help.
I got it working.
Thanks Brian for your help as well.
 

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