I have been told that adding a new menu bar to Word2011 is similar (identical?) to adding one in pre-2007 versions. I have copied my 2003 code to create a menu bar and a dropdown list within that menu bar. This is the relevant part of the code:
I then populate the list with the items from a designated folder. All of this works fine.
What is not fine is the list itself as it sits in its 'pre-clicked' state. It is not properly shown. The bottom half of the list item #1 and the top half of list item #2 show as the first line in the un-expanded list.
When I drop down the list it shows (and behaves) properly, but the initial view is horrible.
I tried to increase the heights of both the bar and of the dropdown, but neither has any effect.
Here is what I tried:
What do I do?
Code:
Set myBar = CommandBars.Add(Name:=barname, Position:=msoBarTop, Temporary:=True) 'for the bar itself
Set NewList = myBar.Controls.Add(Type:=msoControlDropdown) 'for dropdown list #1
Set NewList = myBar.Controls.Add(Type:=msoControlDropdown) 'for dropdown list #2
I then populate the list with the items from a designated folder. All of this works fine.
What is not fine is the list itself as it sits in its 'pre-clicked' state. It is not properly shown. The bottom half of the list item #1 and the top half of list item #2 show as the first line in the un-expanded list.
When I drop down the list it shows (and behaves) properly, but the initial view is horrible.
I tried to increase the heights of both the bar and of the dropdown, but neither has any effect.
Here is what I tried:
Code:
Set myBar = CommandBars.Add(Name:=barname, Position:=msoBarTop, Temporary:=True) 'for the bar itself
mybar.height = 75
Set NewList = myBar.Controls.Add(Type:=msoControlDropdown) 'for dropdown list #1
newlist.height = 60
Set NewList = myBar.Controls.Add(Type:=msoControlDropdown) 'for dropdown list #2
newlist.height = 60