Displaying A User Form With A Macro When User Opens Powerpoint

  • Thread starter Thread starter Olan
  • Start date Start date
O

Olan

Hi,
I have to make some office templates which will capture Custom Document
Properties.
I have made some in Xcel & word no problem which basically display a
UserForm when the User chooses to open a word file based on that particular
template.
This is done by a piece of VB code to show the user form - this code is
placed in the Microsoft Word Objects area of the VB editor but there does
not seem to be an equivalent in Powerpoint ie I can insert the UserForm but
I can not seem to place code in the template to display it when the User
chooses to create a ppt document based on the template.
Can anyone help me - is what I am trying to do possible?? I hope its clear
what I am talking about!!
Thanks in advance, Olan
 
Hey Shyam,

Thanks for your reply.

I did that but becasue i am putting this in a template i need an event of

"Document_New" or "Auto_New" rather than "Auto_Open" or "Auto_Close".

I have tried this but it doesnt seem to work.

It works if I save it as a document but when i save it as a template and
open a new ppt doc basing it on the template it does nothing, am I missing
something?

thanks in advance, Olan

Create an eventhandler add-in of your own to trap events or use this free
 
Olan,

Unlike Word/Excel, PowerPoint has no way to automatically run code when a
presentation or template is opened. The way around that is to use Shyam's code
(to trap events) and your own code (to respond to any of those events you think
appropriate) and combine them into a PowerPoint Add-in.

Have a look here and at the other FAQs to either side of it:

Create an ADD-IN with TOOLBARS that run macros
http://www.rdpslides.com/pptfaq/FAQ00031.htm

Hey Shyam,

Thanks for your reply.

I did that but becasue i am putting this in a template i need an event of

"Document_New" or "Auto_New" rather than "Auto_Open" or "Auto_Close".

I have tried this but it doesnt seem to work.

It works if I save it as a document but when i save it as a template and
open a new ppt doc basing it on the template it does nothing, am I missing
something?

thanks in advance, Olan

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
OK so I make an add on that displays a UserForm when the User opens up a ppt
doc and make it an add in.
Then you've got to load it every time in order to display this UserForm?
thanks for your help, Olan
 
OK so I make an add on that displays a UserForm when the User opens up a ppt
doc and make it an add in.
Then you've got to load it every time in order to display this UserForm?
thanks for your help, Olan

No; once the addin's loaded, it'll load again whenever PPT starts up until you
manually unload it.

So the sequence of events is something like:

PowerPoint starts
Add-in loads

The addin includes Shyam's event code and the code you've written to handle the
events. For example, in response to the event triggered when a PPT is opened,
you could display your user form.

User opens a new file
That triggers an event
Event handling code calls your user form

and so on


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
Thanks, Steve
Steve Rindsberg said:
No; once the addin's loaded, it'll load again whenever PPT starts up until you
manually unload it.

So the sequence of events is something like:

PowerPoint starts
Add-in loads

The addin includes Shyam's event code and the code you've written to handle the
events. For example, in response to the event triggered when a PPT is opened,
you could display your user form.

User opens a new file
That triggers an event
Event handling code calls your user form

and so on



--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
Back
Top