printing dropdown items on form

A

Abbarition

Is there a way to print out all of the items that are
available in a dropdown list when printing a Word form?
I know it isn't ideal to use a drop down when printing a
form, but it just needs to be printed out for personal
reasons. Normally, users will be keying into the form,
not printing.

Thanks!
 
J

Jay Freedman

Abbarition said:
Is there a way to print out all of the items that are
available in a dropdown list when printing a Word form?
I know it isn't ideal to use a drop down when printing a
form, but it just needs to be printed out for personal
reasons. Normally, users will be keying into the form,
not printing.

If you have just one or two dropdowns, you can click the arrow to open the
dropdown and then press the PrintScreen key to take a screen shot to the
clipboard. (Normally you'd want to use Alt+PrintScreen to grab just the
active window, but the Alt key will cause the dropdown to close.) Paste that
into Paint or another graphics program and crop away everything except the
dropdown, and print that. A better alternative is to use a screen-shot
program such as SnagIt or HyperSnap.

If you have more than a few of these to do, try this macro. It will append a
list of the dropdowns and their entry lists at the end of the document, and
you can then print it and either save or discard it. Instructions for using
a macro are at http://www.gmayor.com/installing_macro.htm.

Sub PrintDropdowns()
Dim oFld As FormField
Dim oRg As Range
Dim nEntry As Integer

If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect
End If

Set oRg = ActiveDocument.Range
oRg.Collapse wdCollapseEnd

For Each oFld In ActiveDocument.FormFields
If oFld.Type = wdFieldFormDropDown Then
oRg.Text = vbCr & oFld.Name & ":" & vbCr
oRg.Collapse wdCollapseEnd
For nEntry = 1 To oFld.DropDown.ListEntries.Count
oRg.Text = _
oFld.DropDown.ListEntries(nEntry).Name & vbCr
oRg.Collapse wdCollapseEnd
Next nEntry
End If
Next oFld

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End Sub
 
A

Abbarition

This will work fine. Thanks so much!
-----Original Message-----


If you have just one or two dropdowns, you can click the arrow to open the
dropdown and then press the PrintScreen key to take a screen shot to the
clipboard. (Normally you'd want to use Alt+PrintScreen to grab just the
active window, but the Alt key will cause the dropdown to close.) Paste that
into Paint or another graphics program and crop away everything except the
dropdown, and print that. A better alternative is to use a screen-shot
program such as SnagIt or HyperSnap.

If you have more than a few of these to do, try this macro. It will append a
list of the dropdowns and their entry lists at the end of the document, and
you can then print it and either save or discard it. Instructions for using
a macro are at http://www.gmayor.com/installing_macro.htm.

Sub PrintDropdowns()
Dim oFld As FormField
Dim oRg As Range
Dim nEntry As Integer

If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect
End If

Set oRg = ActiveDocument.Range
oRg.Collapse wdCollapseEnd

For Each oFld In ActiveDocument.FormFields
If oFld.Type = wdFieldFormDropDown Then
oRg.Text = vbCr & oFld.Name & ":" & vbCr
oRg.Collapse wdCollapseEnd
For nEntry = 1 To oFld.DropDown.ListEntries.Count
oRg.Text = _
oFld.DropDown.ListEntries(nEntry).Name & vbCr
oRg.Collapse wdCollapseEnd
Next nEntry
End If
Next oFld

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End Sub


--
Regards,
Jay Freedman
Microsoft 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