Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2016, 02:00 AM
shammi_raj shammi_raj is offline Content Control Field Names/Titles Word Form Windows XP Content Control Field Names/Titles Word Form Office 2013
Novice
Content Control Field Names/Titles Word Form
 
Join Date: Mar 2016
Posts: 5
shammi_raj is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 03-10-2016, 02:35 AM
macropod's Avatar
macropod macropod is offline Content Control Field Names/Titles Word Form Windows 7 64bit Content Control Field Names/Titles Word Form Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by shammi_raj View Post
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.
It would take about as long to write a macro for this as it would to do the job manually.

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]
Reply With Quote
  #3  
Old 03-10-2016, 02:41 AM
shammi_raj shammi_raj is offline Content Control Field Names/Titles Word Form Windows XP Content Control Field Names/Titles Word Form Office 2013
Novice
Content Control Field Names/Titles Word Form
 
Join Date: Mar 2016
Posts: 5
shammi_raj is on a distinguished road
Default

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
I added a quick watch on msgBox. Copied all fields-titles and uses excel
Reply With Quote
  #4  
Old 03-10-2016, 02:54 AM
macropod's Avatar
macropod macropod is offline Content Control Field Names/Titles Word Form Windows 7 64bit Content Control Field Names/Titles Word Form Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Control Field Names/Titles Word Form Finding field names in a Word-Form created by content control shammi_raj Word 1 03-10-2016 02:37 AM
Content Control Field Names/Titles Word Form Adding auto text to end of content control field ksigcajun Word VBA 4 10-13-2014 05:37 AM
Content Control Field Names/Titles Word Form Allow Multiple Content Control same cell of form table DeborahBartlett Word 1 01-04-2014 11:06 AM
Content Control Field Names/Titles Word Form MS WORD 2007 - Content Control versus Text Form Field question chamdan Word VBA 2 11-12-2013 09:51 PM
Content Control Field Names/Titles Word Form Content control titles jillapass Word VBA 3 05-29-2012 06:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft