Quote:
Originally Posted by philip.anthony
I've gone thru those. But not as what I expect. I want to have the coding as follow. But this for single dd content control.
|
The code in the first link I provided shows how to output to a single content control. If you want to have the same output displayed in multiple content controls, either:
• map those content controls; or
• use VBA code to loop through your "Seats " collection. For example, using the approach in that link:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim i As Long, Seats As String
With ContentControl
If .Title = "Room" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
Seats = .DropdownListEntries(i).Value
Exit For
End If
Next
With ActiveDocument.SelectContentControlsByTag("Seats ")
For i = 1 To .Count
.Item(i).Range.Text = Seats
Next
End With
End If
End With
End Sub