Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Drop Down List Widths

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed - 16 Nov 2007 15:35 GMT
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
Doug Robbins - Word MVP - 17 Nov 2007 20:24 GMT
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

Signature

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

> Word 2003 allows me to control the width of a dropdown list. For example:
>
[quoted text clipped - 7 lines]
>
> Ed in Virginia
Ed - 22 Nov 2007 11:19 GMT
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

> Dim i As Long
> Set myOB = ActiveDocument.Shapes _
[quoted text clipped - 21 lines]
>>
>> Ed in Virginia
Doug Robbins - Word MVP - 22 Nov 2007 19:20 GMT
The whole user interface has changed in Word 2007 and the ability of the
user to modify it is drastically limited.

Signature

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

> Doug (or others),
>
[quoted text clipped - 31 lines]
>>>
>>> Ed in Virginia

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.