![]() |
|
#1
|
|||
|
|||
![]()
i have used hundreds of Content Control boxes/fields in my Word doc and I realized I forgot to check the option "Content Control can not be deleted" is there a macro/VBA code that will run through the doc and apply the option to all content control boxes?
I have use drop down boxes and rich text boxes only ![]() |
#2
|
|||
|
|||
![]()
I'm sure one can be written. I don't have one on the shelf.
You might want to change the title of your question to make it more specific: "Change all Content Controls in a document to non-deletion using VBA" would be a suggestion. One other thing is I would suggest that you want a document template rather than a document if you are going to be using this to generate new documents. Templates in Microsoft Word |
#3
|
|||
|
|||
![]()
Thanks for the suggestions but the form I am creating is the template
You will see I have updated the title as asked |
#4
|
|||
|
|||
![]()
Nope, I don't see it.
|
#5
|
|||
|
|||
![]()
The following might work:
Code:
Sub ChangeCCToNoDelete() ' Macro to set all Content Controls to locked (no delete) ' Written by Charles Kenyon 2013-11-06 Dim oCC As ContentControl For Each oCC In ActiveDocument.ContentControls oCC.LockContentControl = True Next oCC End Sub I have not tested this extensively, but it seems to work. |
#6
|
|||
|
|||
![]()
Thank I will give it a try!
|
#7
|
|||
|
|||
![]()
Wonderful thank you it has worked!!
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using both rich and plain content controls in one document | Erica.Black | Word | 0 | 06-18-2013 10:33 AM |
![]() |
tinfanide | Word VBA | 8 | 03-04-2013 04:15 AM |
Macro to link 2 content controls | bortonj88 | Word VBA | 2 | 08-21-2012 06:24 AM |
Content Controls Form Programming | beachdog | Word VBA | 4 | 09-20-2011 10:26 AM |
![]() |
cksm4 | Word VBA | 2 | 03-01-2011 12:46 PM |