#1
|
|||
|
|||
Content Control Field Names/Titles Word Form
Dear Friends,
Thank you in advance. Sounds fairly easy but I have no previous experience in creating forms in word doc. I created a long form with about 150 Q&A (fields). I used 2013 content control objects (drop down and combo box mainly) to allow selections by the user. However, now I want to get all the fields names of 150 questions. Manually it is a big ask ( going to each control->properties->name). I am thinking, if there is a means to get all the field names (not the field data) export into excel easily. Any help is highly appreciated. best regards raj |
#2
|
||||
|
||||
Quote:
BTW, there is no need for "going to each control->properties->name" - you need only click on a content control to see its title.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you Paul. I want to find the titles of each field. I found a work around with a VB code. Between VB - Quick Watch and Text-to-column on excel, i was able to do it.
Code:
Sub CountFields() Dim iCnt As Integer Dim f As Field iCnt = ActiveDocument.Fields.Count Dim CCtrl As ContentControl Dim alltitles As String For Each CCtrl In ActiveDocument.ContentControls alltitles = CCtrl.Title & ";" & alltitles Next MsgBox alltitles End Sub |
#4
|
||||
|
||||
That's one way of addressing the problem - and requires much less programming effort than your request for code to both get the titles and write them to an Excel workbook.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Finding field names in a Word-Form created by content control | shammi_raj | Word | 1 | 03-10-2016 02:37 AM |
Adding auto text to end of content control field | ksigcajun | Word VBA | 4 | 10-13-2014 05:37 AM |
Allow Multiple Content Control same cell of form table | DeborahBartlett | Word | 1 | 01-04-2014 11:06 AM |
MS WORD 2007 - Content Control versus Text Form Field question | chamdan | Word VBA | 2 | 11-12-2013 09:51 PM |
Content control titles | jillapass | Word VBA | 3 | 05-29-2012 06:11 AM |