Quote:
Originally Posted by macropod
|
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. But the code I am looking for Multiple dd content control. How does that work?
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim oCC As ContentControl
For Each oCC In ActiveDocument.ContentControls
If oCC.Title = "Room" Then
Select Case oCC.Range.Text
Case "Room 1"
ActiveDocument.SelectContentControlsByTitle("Seats ").Item(1).Range.Text = "63 Seats"
Case "Room 2"
ActiveDocument.SelectContentControlsByTitle("Seats ").Item(1).Range.Text = "25 Seats"
Case "Room 3"
ActiveDocument.SelectContentControlsByTitle("Seats ").Item(1).Range.Text = "42 Seats"
Case Else
ActiveDocument.SelectContentControlsByTitle("Seats ").Item(1).Range.Text = ActiveDocument.SelectContentControlsByTitle("Seats ").Item(1).PlaceholderText
End Select
End If
Next oCC
lbl_Exit:
Set oCC = Nothing
Exit Sub
End Sub