View Single Post
 
Old 04-19-2013, 10:13 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

In you XML the Schemas should really be
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

Why it doesn't work:

When you click a gallery the vba is doing exactly what you say .... everything!

You need to read the index of the item clicked and use it to select what happens

'Callback for Gallery1 onAction
Sub ClickImage(control As IRibbonControl, id As String, index As Integer)
Select Case index
Case Is = 1
'do this
Case Is = 2
'do this
'etc
End Select
End Sub

I would use SlideRange(1) BTW and also add some error checking to make sure a presentation is open and that a slide is selected.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote