Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Pathagoras1953

macrumors newbie
Original poster
Aug 22, 2011
7
0
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:

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
What do I do?
 

Attachments

  • Screen shot.gif
    Screen shot.gif
    6.3 KB · Views: 98
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.