PDA

View Full Version : Custom Ribbon and potm file problem



mike009
11-14-2008, 03:08 AM
Hi all
I have the same problem as https://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.office.developer.vba&tid=3f1c38d1-96bf-44f7-bfe1-75c67eca89ae&cat=en_US_d9a29b97-adac-4d22-ab4f-0f12dc809f5d&lang=en&cr=US&sloc=&p=1
But the different is that i want to start the macro from any instance of the potm file
more info:

In the potm file:
1- i have custom ribbon that contain a link to a macro
2- if i open the template by right click open then i'm using the template it self then i can click and run the macro
3-If i just double click the template and create an instance of it and try to run the macro i get this message : "The Macro cannot be found or has been disabled because of your security settings"
but i enabled the macro in the security settings.. any by default the new presentation will be saved as pptm

Any Idea

John Wilson
11-14-2008, 06:17 AM
"any by default the new presentation will be saved as pptm"

Has it been saved though?

mike009
11-14-2008, 08:04 AM
Hi John Wilson,

no it's not saved, i just have the title Presentation1 with no extension
http://www.vbaexpress.com/forum/showthread.php?p=166487#post166487

Mike

John Wilson
11-14-2008, 10:21 AM
Hi John Wilson,

no it's not saved, i just have the title Presentation1 with no extension
http://www.vbaexpress.com/forum/showthread.php?p=166487#post166487

Mike
You will probably find that when you save as a pptm the code will run, new files open as a pptx.

However I never distribute a macro in a template. A ppam file is much more reliable and will also enable you to set macro security higher once it is installed to auto open. You would probably need to detect the use of a particular template and to do this you would need to have an event handler looking for maybe the windowselectionchange event or the openpresentation event? If you drop me an email I have a short fact sheet on event trapping that will help
john ATSIGN pptalchemy.co.uk