![]() |
#4
|
|||
|
|||
![]()
I think the answer to your question is "no" you can't query both .Tag and .Title simultaneously to find the content control of interest.
For what is seems to me you are trying to do though, something like this might do. Code:
Private Sub Document_ContentControlOnExit(ByVal oCC As ContentControl, Cancel As Boolean) Dim collCCs As ContentControls Dim oCCTarget As ContentControl Select Case oCC.Tag Case "a" Set collCCs = ActiveDocument.SelectContentControlsByTag("b") For Each oCCTarget In collCCs If oCCTarget.Title = oCC.Title Then oCCTarget.Range.Select Exit For End If Next End Select End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
gsbpxw | Word VBA | 1 | 10-22-2018 12:45 PM |
VBA to provide text string with specific formating based on Drop down list (content control) | MP1989 | Word VBA | 4 | 07-30-2018 02:40 AM |
How to display tag in Content Control instead of title | vinbalraj | Word | 1 | 03-02-2018 08:55 AM |
![]() |
shammi_raj | Word | 1 | 03-10-2016 02:37 AM |
![]() |
warbird | Word VBA | 2 | 07-13-2015 05:44 AM |