Hello folks

I've been trying to create a simple custom toolbar in 2007.
My thinking is to then just copy the content (only 2 buttons at present)
onto the quick access toolbar / Custom toolbars.

I have a couple of add-ins that look for a given toolbar name then
add their button. Haven't had much success creating the toolbar
if it doesn't exist (PP 2003 or 2007)! Used to just manually create the
new toolbar in 2003 then install the add-in and life was fine.

Following code gives you the idea (thanks to the various bits shared by others) ...
Alternatively does someone have a simple framework to create a ribbon

[VBA]Sub Auto_Open()

Dim NewControl As CommandBarControl

' Store an object reference to a command bar.
Dim MyBar As CommandBar

' Figure out where to place the menu choice.
Set MyBar = Application.CommandBars

' MsgBox ("Ready to create Prep if not exists")

' If no Prep toolbar yet, create it - this bit doesn't work but you get the idea

If Not MyBar("Prep") Then
MsgBox ("Prep doesn't exist")
Set MyBar = CommandBars.Add(Name:="Prep", Position:=msoBarTop)
End If


' Create the menu choice. The choice is created in the Prep menu
Set NewControl = MyBar("Prep").Controls.Add _
(Type:=msoControlButton)

' Name the command.
With NewControl
.Caption = "Link"
.Style = msoButtonIconAndCaption
.FaceId = 2897
.OnAction = "Surname_to_link"

End With

End Sub[/VBA]

Thanks for reading,
Kyle