![]() |
#5
|
|||
|
|||
![]() Quote:
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 Last edited by philip.anthony; 03-25-2022 at 12:02 PM. |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
silverspr | Word VBA | 9 | 09-30-2020 07:53 AM |
![]() |
matthias92701 | Word VBA | 2 | 05-02-2019 03:54 PM |
Content Control DropDown List | gabster | Word VBA | 4 | 04-30-2019 09:53 PM |
![]() |
hrzagi | Word | 1 | 12-17-2017 09:38 PM |
![]() |
asteinroeder | Word VBA | 5 | 10-28-2015 03:56 PM |