![]() |
|
|
|
#1
|
||||
|
||||
|
AFAIK, the only way to use the title directly is to loop through the collection:
Code:
Dim CCtrl As ContentControl
For Each CCtrl In ActiveDocument.ContentControls
If CCtrl.Title = "My Title" Then
'do something
End If
Next
Code:
Sub Demo()
Dim CCtrlSet As Variant, CCtrl As ContentControl
Set CCtrlSet = ActiveDocument.ContentControls
For Each CCtrl In CCtrlSet
If CCtrl.Title = "My Title" Then
'do something
End If
Next
Set CCtrlSet = Nothing
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Move to next content control
|
cksm4 | Word VBA | 13 | 07-02-2019 07:48 PM |
Rich Text Content Control - Allow User Formatting
|
keithacochrane | Word | 1 | 05-28-2012 05:06 PM |
| Retrieving content control value | jillapass | Word VBA | 4 | 05-24-2012 05:07 AM |
content control Word 2007
|
TessaLee | Word | 1 | 03-11-2011 12:51 AM |
| Templates: automatic text generation from Rich Text content control | Chickenmunga | Word | 0 | 10-01-2008 11:16 AM |