|
||
|---|---|---|
| PowerPoint tips, hints and tutorials that will change your presentations for ever! | ||
|
Jigsaws |
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! Sub Hello() 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 <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> Copy and paste it in and save.
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. Change the XML Change the label text to alter the ribbon heading Change onAction text for a different macro To make the entry in the Home Tab use TabHome instead of TabAddIns The image "Accept Invitation" is a green tick This is of course just the start try googling for Ribbonx or Custom UI Editor NEW VERSION OF CUSTOM UIEDITOR There's a new version which supports the new xml features in 2010. If you are used to the old version you may be caught out by the extra step needed to select 2007 or 2010 BEFORE pasting or writing the XML. Note for most standard users 2007 will work in both.
|
|
|
Articles on your favourite sport Free Microsoft PowerPoint Advice, help and tutorials, Template Links |
||