Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-25-2022, 07:05 AM
philip.anthony philip.anthony is offline How to Display Text on Multiple dropdown content control result Windows 10 How to Display Text on Multiple dropdown content control result Office 2019
Novice
How to Display Text on Multiple dropdown content control result
 
Join Date: Mar 2022
Location: Malaysia
Posts: 6
philip.anthony is on a distinguished road
Wink

Quote:
Originally Posted by macropod View Post
For:

Dependent Text Content Controls
https://www.msofficeforums.com/word-...html#post46903
and, for different elements from a selected item to be output to different content controls, see:
https://www.msofficeforums.com/word-...tml#post120392

Dependent Dropdown Content Controls
https://www.msofficeforums.com/word-...html#post77762
and, for multiple levels of dependency:
https://www.msofficeforums.com/word-...tml#post132696

Cascading Dropdown Content Controls
https://www.msofficeforums.com/word-...html#post94603

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.
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Display Text on Multiple dropdown content control result Content Control values NOT display name silverspr Word VBA 9 09-30-2020 07:53 AM
How to Display Text on Multiple dropdown content control result Auto populate a text field based on Content Control Dropdown List matthias92701 Word VBA 2 05-02-2019 03:54 PM
Content Control DropDown List gabster Word VBA 4 04-30-2019 09:53 PM
How to Display Text on Multiple dropdown content control result Dropdown content control and tables hrzagi Word 1 12-17-2017 09:38 PM
How to Display Text on Multiple dropdown content control result Content Control Dropdown Dependencies asteinroeder Word VBA 5 10-28-2015 03:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft