![]() |
|
#1
|
|||
|
|||
![]()
If you want to validate "all" CCs in the main text story range of the document then all you need is:
Dim oCC as ContentControl For Each oCC In ActiveDocument.ContentControls 'Your code here Next oCC It doesn't matter if they have a title or not. Note: That only applies if "all" of the CCs are in the main text storyrange. If you have CCs in the headers, footers, textboxes, etc. then you would have to process each of those storyranges as well. If you only want to process some of the CCs in the document then you would list and process them in your code as you have done so far, or you could apply a unique tag to the ones you want to process e.g., "Validate" and use Dim oCC as ContentControl Dim oCCs as ContentControls Set oCCs = ActiveDocument.SelectContentControlsbyTag("Validat e") For Each oCC in oCCs 'Your code here Next oCC Get it? |
#2
|
|||
|
|||
![]() Quote:
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use VBA to show text when content control check box is checked | kvrieze | Word VBA | 1 | 08-19-2023 03:11 AM |
MsgBox launch when a Check Box Content Control is clicked | wolfgrrl | Word VBA | 1 | 06-21-2019 12:13 PM |
![]() |
Strogg | Word | 3 | 02-10-2019 11:45 AM |
Check Box Content Control when checked users are presented with an option | cryder | Word | 0 | 01-07-2016 05:11 AM |
![]() |
canadansk | Word VBA | 5 | 04-01-2015 08:21 AM |