Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-22-2025, 09:59 PM
CompletelyLost CompletelyLost is offline How to auto populate a rich text content control box from a selection in a combo control box Windows 11 How to auto populate a rich text content control box from a selection in a combo control box Office 2021
Novice
How to auto populate a rich text content control box from a selection in a combo control box
 
Join Date: Apr 2025
Posts: 4
CompletelyLost is on a distinguished road
Default How to auto populate a rich text content control box from a selection in a combo control box

I have Office 365 and that wasn't an option to choose. I am creating a template in Word. I have tried everything I can think of, but I'm not a programmer. All I want to do is have a text box titled "Company" automatically populate based on a dropdown combo content box titled "Contractor", selected value. I think I've tried every option in other threads that I could find. This is the last one and it's not working. I don't know if it makes a difference or not, but the "Company" text box is in the header and the "Contractor" dropdown box is in the main document.

Private Sub Document_ShowTextBasedOnDropdown(ByVal CCtrl As ContentControl, Cancel As Boolean)
Dim i As Long, StrDetails As String
With CCtrl
If .Title = "Company" Then
For i = 1 To .DropdownListEntries.Count
If .DropdownListEntries(i).Text = .Range.Text Then
StrDetails = ActiveDocument.SelectContentControlsByTitle("Contr actor").Item(1).Range.Text
Exit For
End If
End With
End If
End Sub



If I can get this to work, I also have another text box that needs to auto populated based on another text box. So like "Project Name 1" populates "Project Name 2".
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto populate a rich text content control box from a selection in a combo control box Auto populate a text field based on Content Control Dropdown List matthias92701 Word VBA 2 05-02-2019 03:54 PM
Copy Formatted Text in one Rich Text Content Control to another Rich Text Content Control Haygordon Word 1 04-05-2019 05:43 AM
How to auto populate a rich text content control box from a selection in a combo control box Auto populate text box based on drop-down content control and repeat the process via copy paste helenndp Word VBA 2 09-27-2018 11:04 AM
Combo Box Content Control Calculate on selection help ciresuark Word 0 03-06-2015 01:49 PM
How to auto populate a rich text content control box from a selection in a combo control box How do you set rich text in a content control Testor Word VBA 4 07-08-2012 07:55 AM

Other Forums: Access Forums

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