Drop Down List Widths

E

Ed

Word 2003 allows me to control the width of a dropdown list. For example:

Set newlist = CommandBars(listnameis).Controls.Add(Type:=msoControlDropdown)
newlist.Width = 175

This command does not appear to function when the macro is run in Word2007.
Is there a command in Word2007 that approximates the dropdown list width
controls of Word2003?

Ed in Virginia
 
D

Doug Robbins - Word MVP

Dim i As Long
Set myOB = ActiveDocument.Shapes _
.AddOLEControl(ClassType:="Forms.ComboBox.1")
With myOB.OLEFormat
.Activate
Set myObj = .Object
End With
With myObj
For i = 1 To 3
.AddItem "Item" & i
Next i
.Width = 175
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
E

Ed

Doug (or others),

The list I was referring to is a drop down list in the command bar area
of the Word 2007 screen. Yours works great for adding a DDL in a document,
but I need the more 'permanent' type of list that is independant of the
active document. Any thoughts? Thanks.

Roy
 
D

Doug Robbins - Word MVP

The whole user interface has changed in Word 2007 and the ability of the
user to modify it is drastically limited.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top