Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 04-25-2025, 04:58 AM
gmaxey gmaxey is offline How to auto populate a rich text content control box from a selection in a combo control box Windows 10 How to auto populate a rich text content control box from a selection in a combo control box Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,652
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Paul, of course you are correct (at least partially in my opinion). My statement was certainly misleading and incorrect. CCs do work in documents restricted for filling in forms. What doesn't work is the the line of code that I provided to write a value to the "Company" CC. You can't do that when the form is restricted for filling in forms. You would first have to unprotect the document.

Code:
Case "Contractor"
      For Each oDLE In .DropdownListEntries
        If oDLE.Text = .Range.Text Then
          .Range.Text = oDLE.Value
          ActiveDocument.Unprotect 'plus password if used.
          ActiveDocument.SelectContentControlsByTitle("Company").Item(1).Range.Text = oDLE.Value
          ActiveDocument.Protect wdAllowOnlyFormFields, False 'Plus password if ture
          Exit For
        End If
      Next oDLE

Now, where our opinions differ is "Where they don't work well is in documents that also contain formfields." Personally, I have never encountered a difficulty.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
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 02:29 PM.


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