![]() |
|
#1
|
||||
|
||||
![]()
The following will extract the data to an worksheet including the values from the checkboxes. Extract data from forms You can save the worksheet as CSV.
The basic code to get the value from a checkbox content control is Code:
Sub Macro1() Dim oCC As ContentControl Dim objCC As Object Dim strData As String Set oCC = ActiveDocument.SelectContentControlsByTitle("SportsCheckbox").Item(1) If oCC.Type = wdContentControlCheckBox And Val(Application.Version) > 12 Then Set objCC = oCC If objCC.Checked Then strData = True Else strData = False End If MsgBox strData Else MsgBox "Not a checkbox" End If End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
Tags |
export, word form |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
append multiple time values to date in one column | sarahafeez | Excel | 1 | 09-25-2017 11:01 PM |
![]() |
erik816 | Word VBA | 1 | 03-09-2016 12:48 AM |
Custom form - tab to **after** existing text in field | luketemp | Outlook | 0 | 03-04-2016 09:11 AM |
![]() |
charlesdh | Word VBA | 12 | 07-30-2015 08:21 PM |
![]() |
aarun2 | Word VBA | 1 | 04-08-2014 03:20 PM |