Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Are you manually creating the ribbon with the buttons? I use the <a href="http://openxmldeveloper.org/articles/CustomUIeditor.aspx" rel="noreferrer">Custom UI Editor Tool</a> and it works like a charm.</p> <ol> <li><p>Just create any macro in your .pptm, like this:</p> <pre><code>Sub SayHello(ByVal control As IRibbonControl) MsgBox "hello" End Sub </code></pre> <p>The <code>(ByVal control As IRibbonControl)</code> part is important. </p></li> <li><p>Then save and close your .pptm.</p></li> <li><p>Open the Custom UI Editor Tool. From that tool, click <strong>Open</strong> from the <strong>File</strong> menu and navigate to your .pptm and open it.</p></li> <li><p>On the <strong>Insert</strong> menu, click <strong>Office 2010 Custom UI Part</strong>. This will create a new XML document that will be inserted into your .pptm.</p></li> <li><p>You can then use sample snippets to start creating your ribbon, but the simplest is just from the <strong>Insert | Sample XML</strong> menu, just click on <strong>Custom Tab</strong>. This will insert:</p> <pre><code>&lt;customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"&gt; &lt;ribbon startFromScratch="false"&gt; &lt;tabs&gt; &lt;tab id="customTab" label="Custom Tab"&gt; &lt;group id="customGroup" label="Custom Group"&gt; &lt;button id="customButton" label="Custom Button" imageMso="HappyFace" size="large" onAction="Callback" /&gt; &lt;/group&gt; &lt;/tab&gt; &lt;/tabs&gt; &lt;/ribbon&gt; &lt;/customUI&gt; </code></pre> <p>Where you see <code>Callback</code> in after <code>onAction</code>, replace it with the name of your macro. In our example above, it is <code>SayHello</code>, so it should now look like <code>onAction="SayHello"</code>.</p></li> <li><p>Click <strong>Save</strong> and then close the Custom UI Editor Tool.</p></li> <li><p>Open your .pptm in PowerPoint and test that a tab called <strong>Custom Tab</strong> has been created. Navigate to it and click on the happy face button. You should now get a message box.</p></li> <li><p>Go to the Backstage by clicking on <strong>File</strong> and click <strong>Save As...</strong> and then choose as the file type PowerPoint Add-in (*.ppam) and save it in any location. Note the location.</p></li> <li><p>Go to <strong>File | Options | Add-in</strong> and then select <strong>PowerPoint Add-ins</strong> from the <strong>Manage</strong> dropdown at the bottom of the dialog. Then click <strong>Go</strong>. Click **Add New...* and add your add-in from the location you saved it.</p></li> <li><p>Close PowerPoint and reopen it. The <strong>Custom Tab</strong> ribbon should be there. Click on the happy face icon to run your <code>SayHello</code> macro.</p></li> </ol> <p>The only thing you'll need to do beyond this is to customize your macros and ribbon controls they way you need them and for what you want them to do. Check out this link for more info: <a href="http://msdn.microsoft.com/en-us/aa338202(office.12).aspx" rel="noreferrer">Customizing the 2007 Office Fluent Ribbon for Developers</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload