printing out drop-down lists from a form

G

Guest

I have a form with many drop-down lists created. How can I print out the drop
down lists?
 
D

Doug Robbins - Word MVP

Run the following macro on exit from a formfield in the document (when the
document is protected). It will create a new document containing the
entries from each drop down in the format

Entries in DropDown [name of bookmark assigned to the dropdown formfield]
Entry(1)
Entry(2)
etc.

Dim ddff As FormField, target As Document, source As Document, i As Long
Set source = ActiveDocument
Set target = Documents.Add
For Each ddff In source.FormFields
If ddff.Type = wdFieldFormDropDown Then
target.Range.InsertAfter "Entries in DropDown " & ddff.Name & vbCr
For i = 1 To ddff.DropDown.ListEntries.Count
ddff.DropDown.Value = i
target.Range.InsertAfter ddff.result & vbCr
Next i
End If
Next ddff


--
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