Listbox text properties

  • Thread starter Thread starter mariatherp
  • Start date Start date
M

mariatherp

Hi There,

I am creating a form letter with a drop-down formfield that has only
three entries. The text of one of the entries is longer than allowed.
How can I change the properties?

Thanks,

Maria
 
You can't. But you might be able to make use of the following:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name
'
Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown
Company = myDrop.ListEntries(myDrop.Value).Name
Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value
ActiveDocument.FormFields("Text1").Result = Address


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
Hi Doug,

Thanks so much for your help. I used this code:

Public Sub add_listentry()
With Documents("POA NR - NO COVERAGE CHG.doc").FormFields("dropdown1"
_
.DropDown.ListEntries
.Add Name:="Power of Attorney and Declaration of Attorney-in-Fact"
End With
End Sub

I have another question? When the user selects this text from th
listbox the text moves down to the next line. How would I left justif
the selection?

Thanks,

Mari
 
Hi Doug,

Thanks so much for your help. I used this code:

Public Sub add_listentry()
With Documents("POA NR - NO COVERAGE CHG.doc").FormFields("dropdown1"
_
.DropDown.ListEntries
.Add Name:="Power of Attorney and Declaration of Attorney-in-Fact"
End With
End Sub

I have another question? When the user selects this text from th
listbox the text moves down to the next line. How would I left justif
the selection?

Thanks,

Mari
 
Back
Top