Change the XML markup as shown in Listing

Listing 14.28. XML Markup for controlling the custom task pane from the Ribbon

<customUI xmlns=" 2 006/01/customui" onLoad="OnLoad"> <ribbon> <tabs>

<tab idMso="TabAddIns" <group id="MyGroup"

label="My Group"> <toggleButton id="toggleButton1" label="Custom Task Pane"

screentip="Show and Hide the Custom Task Pane" onAction="OnToggleButton1" />

</group> </tab> </tabs> </ribbon> </customUI>

7. Uncomment the code at the top of the Ribbon1.vb code file to handle the service request to hook up the custom Ribbon, as was shown in Figure 14.9.

8. Press F5 to run the code.

When PowerPoint opens, the Custom task pane is not visible. If you click the Add-Ins tab and then click the Custom Task Pane toggle button, the Custom task pane becomes visible. If you click the Custom Task Pane toggle button again, the task pane is removed.

0 0

Post a comment