printing the names of text form fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to print the names of the text form fields in a document (I
renamed them using my own naming convention instead of using the default
"text#" names.

thanks for your response

rags
 
Is there a way to print the names of the text form fields in a document (I
renamed them using my own naming convention instead of using the default
"text#" names.

thanks for your response

rags

Make a copy of the document (or if it's really a template, make a
document based on the template) and run this macro while the copy is
the active document:

Sub TextFieldNames()
Dim oFF As FormField
For Each oFF In ActiveDocument.FormFields
With oFF
If .Type = wdFieldFormTextInput Then
.Result = .Name
End If
End With
Next
End Sub

(See http://www.gmayor.com/installing_macro.htm if needed.) This will
put the field's name into the field result.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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

Back
Top