vba dropdown

L

lotsof questions

Doug Robbins responded suggesting a combo box, but I don't
want a combo box...need a drop down list in legal document
but am having difficulties setting up the code to work. I
have bookmarked a "form field" as "DropDown1". Don't know
how to go about establishing reference to the bookmark. I
have worked out the "ListEntries .Add Name part
though....where do I go from here please.

my thanks.....
 
L

lotsof questions additional input

Is there a solution? I think I have figured out the first
part, it works as I need it to, however, the dropdown list
is only giving me the first four items in the
list....programatically - are there still restrictions on
the number of characters and lines you can put into a drop
down??? There is a lot of copy but??? The yada yada stuff
represents legal company names. Also - can I manually
break the lines since they won't wrap? How? I appreciate
your response...

Sample of whats done so far...

Sub Dropdown()

Set ffield = ActiveDocument.FormFields.Add( _
Range:=ActiveDocument.Bookmarks("DropDown1").Range, _
Type:=wdFieldFormDropDown)

With ffield
.Name = "DropDown1"
With .Dropdown.ListEntries
.Add Name:=" " (this is inserted for a blank first
line)
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:="asdfasdfasdf(aoisdj aosid fo;iasd f;asiod
foasid f;ioasdf ;aiosd f;io asdf; asdf asdf asdfio asdio;
asdo fasdf)"
.Add Name:=" aiosdj fo;iasd fo;iasdfioas dfio;a sdfio
as;fio asdo;fi aso;di faso dif asdf ;asdfo asdf asdofi)"
.Add Name:="asl;dfjiasodif oasdifj oasidf oasidfas
dfoas fioasdfioasd f; asdf o; aisdf ;ioas df; oasfi asdf
aosi df asdf)"

End With
End With

End Sub
 

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