![]() |
|
#5
|
||||
|
||||
|
The selected value of a list control is the range.text. You can identify a control by its tag which is by default the same as its title, though either can be changed as required. Frankly it is difficult to see why you would put the list value in a text CC when it is already displayed in the list CC, but if you wish to do so then use the ControlOnExit event to make the update e.g. in your document.
Code:
Option Explicit
Private Sub Document_ContentControlOnExit(ByVal cc1 As ContentControl, Cancel As Boolean)
If cc1.ShowingPlaceholderText = False Then
ActiveDocument.SelectContentControlsByTitle("a").Item(1).Range.Text = cc1.Range.Text
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 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Importing content control data from excel and populate two fields on selected dropdown
|
badarlodhi | Word VBA | 8 | 02-08-2023 10:47 AM |
Find and Replace Selected Text or Macro for finding selected text
|
mrplastic | Word VBA | 4 | 12-20-2019 01:25 PM |
| Copy Formatted Text in one Rich Text Content Control to another Rich Text Content Control | Haygordon | Word | 1 | 04-05-2019 05:43 AM |
| My plain text post got converted to rich text in a reply, how to convert it back? | david.karr | Outlook | 0 | 01-05-2012 09:46 AM |
| Templates: automatic text generation from Rich Text content control | Chickenmunga | Word | 0 | 10-01-2008 11:16 AM |