The this object in Powerpoint

A

Alison

Hi

I have a Powerpoint VBA project into which I want to insert a class
similar to ThisWorkbook in Excel.

Does anyone know what the equivalent Powerpoint class is (or indeed if
there is one?) I can't seem to find anything starting with This in
the VBA Object Browser.

Thanks in advance, Alison.
 
A

Alison

Hi Steve

What I want to do is override methods called on the current
presentation displayed in powerpoint such as close(), save() etc or
register to them in some way. If that's not possible, then can I
override methods on the actual powerpoint application itself?

Thanks, Alison.
 
A

Alison

I don't believe you can do this in the way you can in Excel or Word.
You can write an event handler that traps certain events (closing, saving etc) thogh.

Have a look here and at the links to Shyam's site from it:
Make PPT respond to events
http://www.rdpslides.com/pptfaq/FAQ00004.htm

Hi Steve

That helped a lot so thanks very much for that. I see that, in the
download, the code that starts up the event handler is contained
within a macro that is started from a button press.

What I would like to do is start the event handler automatically when
power point starts up. Is there anyway to do this or is there some
in-built macro that gets fired as soon as powerpoint starts up into
which I could put my event handler code?

Thanks again, Alison.
 
A

Alison

Yes ... if you create an Add-in and put the code that fires up the event handler (and
anything else you want to start automatically) in Sub Auto_Open() it'll run when the
add-in loads.

Poke around the same area of the PPTFAQ for an explanation of how to create an addin.

Hi Steve,

That all worked, so thanks very much for you help.

Cheers, Alison.
 

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