![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
How to get the MS word document checkbox form element associated text value. I am able to extract the value of the checkbox. I tried with bookmark and name properties and found that there is no value associated with bookmark filed of the checkbox. I got the following output. Any thoughts?
Sub Test() Dim strCheckBoxName As String Dim strCheckBoxValue As String For i = 1 To ActiveDocument.FormFields.Count If ActiveDocument.FormFields(i).CheckBox Then strCheckBoxName = ActiveDocument.FormFields(i).Name strCheckBoxValue = ActiveDocument.FormFields(i).CheckBox.Value Debug.Print strCheckBoxName & " = " & strCheckBoxValue End If Next End Sub Output: Check1 = True Check1 = True Check1 = True Check1 = False Check1 = False Check1 = False Solution looking for: A = True B = True C = True D = False E = False F = False Thanks for your help. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro to keep formatted form fields after mail merge or replace text with formatted form fields | jer85 | Word VBA | 2 | 04-05-2015 10:00 PM |
| Entering HELP Text for Word 2010 form fields | slandi | Word | 0 | 03-28-2014 08:09 AM |
| Duplicating form fields (check-boxes) | Jānis | Word | 3 | 09-16-2012 12:09 PM |
Cannot enter text into form fields, Word 2007
|
mjr55 | Word | 7 | 04-19-2012 04:24 PM |
Form Fields - Create blank form text field with if statement?
|
LAssist2011 | Word | 5 | 12-14-2011 03:02 PM |