PDA

View Full Version : Solved: Add item to File Menu Bar in certain position



markh1182
05-30-2007, 09:16 AM
Hi, I have the following code that adds a new item to the File Menu Bar, but places it at the bottom. How do I get this to place it in the 8th position down the list?

With Application.CommandBars.ActiveMenuBar.Controls("File")
.Reset
Set CmdItem = .Controls.Add
CmdItem.Caption = "Import as New Version of Existing Document"
CmdItem.OnAction = "SaveAsNewVersionofiManageDoc"
End With

Bob Phillips
05-30-2007, 10:43 AM
With Application.CommandBars.ActiveMenuBar.Controls("File")
.Reset
With .Controls.Add(before:=8)
.Caption = "Import as New Version of Existing Document"
.OnAction = "SaveAsNewVersionofiManageDoc"
End With
End With