Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-02-2019, 09:44 AM
Haygordon Haygordon is offline Muliple entries in Multiple dropdown lists Windows 10 Muliple entries in Multiple dropdown lists Office 2013
Novice
Muliple entries in Multiple dropdown lists
 
Join Date: Sep 2018
Posts: 5
Haygordon is on a distinguished road
Angry Multiple drop down boxes

Thank you Greg for your guidance I am still struggling and have attached the letter I am trying to construct using the code shown below. There are 5 drop down list box controls in the English text and 5 rich text controls in the French text.


The VB code used is shown below:
Quote:

Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
Dim lngIndex As Long, strDetails As String
With CC
Select Case .Title
Case "condition"
For lngIndex = 1 To .DropdownListEntries.Count
If .DropdownListEntries(lngIndex).Text = .Range.Text Then
strDetails = Replace(.DropdownListEntries(lngIndex).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.SelectContentControlsByTitle("condi tionFR").Item(1).Range.Text = strDetails
Case "condition"
For lngIndex = 1 To .DropdownListEntries.Count
If .DropdownListEntries(lngIndex).Text = .Range.Text Then
strDetails = Replace(.DropdownListEntries(lngIndex).Value, "|", Chr(11))
Exit For
End If
Next
ActiveDocument.SelectContentControlsByTitle("locat ion").Item(1).Range.Text = strDetails
Next
ActiveDocument.SelectContentControlsByTitle("sewer age").Item(1).Range.Text = strDetails
Next
ActiveDocument.SelectContentControlsByTitle("servi ces").Item(1).Range.Text = strDetailsservices
Next
ActiveDocument.SelectContentControlsByTitle("comms ").Item(1).Range.Text = strDetails
End Select
End With
End Sub
Any suggestions as to where I am going wrong? I am thinking that the drop down list control needs to be linked to the rich text control but I haven't got a clue where to start!



Thank you again for your help and patience.


Gordon Hayward
Attached Files
File Type: docm Letter.docm (28.2 KB, 15 views)
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Muliple entries in Multiple dropdown lists Multiple entries in dropdown lists paul_pearson Word VBA 151 10-18-2023 04:23 PM
Help with Dropdown Lists Gerardo G Word VBA 1 06-18-2015 11:10 PM
Dropdown Lists in Excel 2010 janehoss Excel 0 12-01-2014 07:16 AM
Muliple entries in Multiple dropdown lists VBA Dropdown change list Entries automatically QA_Compliance_Advisor Word VBA 20 09-16-2014 07:29 AM
Word Forms : Dropdown lists wferaera45 Word 0 04-06-2006 03:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:41 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