![]() |
|
#1
|
||||
|
||||
![]()
Assuming the dropdown controls you mentioned are the only ones in the document and your text content control has the title 'Output', you could use code in the document's 'This Document' module like:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim StrOutput As String, CtrlID As String If ContentControl.Type <> wdContentControlDropdownList Then Exit Sub For Each ContentControl In ContentControls If ContentControl.Type = wdContentControlDropdownList Then If ContentControl.Range.Text <> ContentControl.PlaceholderText Then StrOutput = StrOutput & ContentControl.Range.Text & "+" Else StrOutput = StrOutput & "N/A" & "+" End If End If If ContentControl.Title = "Output" Then CtrlID = ContentControl.ID Next StrOutput = Left(StrOutput, Len(StrOutput) - 1) ContentControls(CtrlID).Range.Text = StrOutput End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
cksm4 | Word VBA | 13 | 07-02-2019 07:48 PM |
![]() |
ntjson | Word VBA | 1 | 04-04-2013 12:07 AM |
![]() |
jillapass | Word VBA | 3 | 05-29-2012 06:11 AM |
Retrieving content control value | jillapass | Word VBA | 4 | 05-24-2012 05:07 AM |
Calendar control accepts other values | JeJ | Word | 0 | 03-02-2011 03:38 PM |