![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#11
|
|||
|
|||
|
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. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 do you set rich text in a content control
|
Testor | Word VBA | 4 | 07-08-2012 07:55 AM |