|PowerPoint tips, hints and tutorials that will change your presentations for ever!|
How to Add a Ribbon Entry That Runs a Macro in 2007
In earlier versions quite a lot of code was needed to add a button or menu to run macros in an add in. In 2007 though it is much simpler the method may be unfamiliar.
Here's how to write a simple add in in 2007 with a ribbon entry. NB this is just the basics!
First write your code:
Open the vbe with Alt f11 and insert a module. Add the simplest code in the world!
Feel free to write your own code if you wish!!
Now save as a pptm file.
The easiest way to add xml to a pptm file is to use "Office 2007 Custom UI Editor" it's free and you can get it here:
Now run the editor and use it to open your pptm file. You just need to add the xml to the window and save and all is done.
Here's the xml for this simple project:
IF YOUR MACRO ISN'T CALLED "Hello" change the onAction
NOTE IN XML CASE is important
In the Custom Ui Editor Insert > 2007 Custom UI Part. Note you do NOT need to choose 2010 Part unless you need features that only appear in 2010/13 (Not likely at this stage)
Now Paste in the XML Code above. save the file.
When you open the pptm you should now have a new entry in the AddIns tab that will run the macro. Save as a ppam Add In and the ribbon entry is included. You will need to load the AddIn just the first time and after that it will always be available
Change the XML If You Need More
Change the label text to alter the ribbon heading
Change onAction text for a different macro
More buttons?? After the line <button id ................/> add a similar line with a different button id and onAction Macro. You must use unique ids for the buttons.
To make the entry in the Home Tab use TabHome instead of TabAddIns
The image "Accept Invitation" is a green tick
CancelRequest is a red X
This is of course just the start try googling for Ribbonx or Custom UI Editor
COMPLETELY STUCK? We can do this for at a very competive rate! Contact
Free Microsoft PowerPoint Advice, help and tutorials, Template Links