![]() |
#2
|
||||
|
||||
![]()
Why not simply loop through all the cross-references? For example:
Code:
Sub Demo() Dim Fld As Field, StrWrd As String StrWrd = InputBox("Input the string to find") With ActiveDocument For Each Fld In .Fields With Fld If .Type = wdFieldRef Then If InStr(.Result, StrWrd) > 0 Then MsgBox StrWrd & " can be found in a field" Exit Sub End If End If End With Next End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
cross-reference, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MAHE | Word VBA | 4 | 03-03-2018 07:59 AM |
![]() |
Slamzor | Word VBA | 1 | 12-01-2017 05:12 PM |
![]() |
nospamdav999 | Word | 5 | 05-13-2017 03:43 AM |
![]() |
wmac | Word | 1 | 05-14-2013 08:54 PM |
Cross reference issues with word to PDF | rammrunal | Word | 0 | 07-17-2012 05:30 AM |