T
tsract
I would like to be able to Enumerate the tabs in the Office 2007. Before my
clients upgraded to 2007 I was able to do things like this:
Sub oem()
Dim cmdBar As CommandBar
Dim mnuCtrl As CommandBarControl
'Enumerate non-Builtin Menus
'-----------------------------------------------------
For Each mnuCtrl In CommandBars.ActiveMenuBar.Controls
If mnuCtrl.BuiltIn = False And mnuCtrl.Enabled = True Then
MsgBox mnuCtrl.Caption
End If
Next
'Enumerate non-Builtin CommandBars
'--------------------------------------------------------
For Each cmdBar In Application.CommandBars
If cmdBar.BuiltIn = False And cmdBar.Enabled = True Then
MsgBox cmdBar.Name
End If
Next
End Sub
My addin needs to know what 3rd party tabs are currently loaded in the
Ribbon, but so far I can't find a simple solution. It appears that I have to
programmatically parse through a bunch of xml, but I don't know where to
begin to do that.
FYI: I'm writting the Addin in unmanaged c++; but I can read code examples
in vb, vba, and c#
clients upgraded to 2007 I was able to do things like this:
Sub oem()
Dim cmdBar As CommandBar
Dim mnuCtrl As CommandBarControl
'Enumerate non-Builtin Menus
'-----------------------------------------------------
For Each mnuCtrl In CommandBars.ActiveMenuBar.Controls
If mnuCtrl.BuiltIn = False And mnuCtrl.Enabled = True Then
MsgBox mnuCtrl.Caption
End If
Next
'Enumerate non-Builtin CommandBars
'--------------------------------------------------------
For Each cmdBar In Application.CommandBars
If cmdBar.BuiltIn = False And cmdBar.Enabled = True Then
MsgBox cmdBar.Name
End If
Next
End Sub
My addin needs to know what 3rd party tabs are currently loaded in the
Ribbon, but so far I can't find a simple solution. It appears that I have to
programmatically parse through a bunch of xml, but I don't know where to
begin to do that.
FYI: I'm writting the Addin in unmanaged c++; but I can read code examples
in vb, vba, and c#