Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 03-25-2022, 02:46 PM
macropod's Avatar
macropod macropod 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 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 

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