View Single Post
 
Old 03-25-2022, 02:46 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,345
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by philip.anthony View Post
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
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote