Share via

Word form fields properties export

Anonymous
2021-08-05T15:07:02+00:00

I have a big set of different word documents that are built as forms. Each document has its own fields.

I would like to gather all the properties of these fields and from all documents in a table in excel.

Note, that I do not want the data inputted in the fields but instead the values of the properties for each field

For example:

Doc1 Field1 Type value of Type
Doc1 Field1 Maximun length value of Maximum length
Doc1 Field1 Bookmark value of Bookmark
Doc1 Field2 Type value of Type
Doc1 Field2 Maximun length value of Maximum length
Doc1 Field2 Bookmark value of Bookmark

Is there a way to do this export ?

Thank you for your help.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2021-08-05T23:40:57+00:00

    Using the following VBA code, you can get the properties of a formfield

    Dim FF As FormField

    For Each FF In ActiveDocument.FormFields

    FF.Type 
    
    FF.TextInput.Width 
    
    FF.Name 
    

    Next

    to do it for a series of documents, see the following page of Graham Mayor's website

    http://www.gmayor.com/document_batch_processes.htm

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments