Search for cross-references

S

Stefan Blom

In Word, cross-references are REF fields, which means you can do the
following: Press Alt+F9 to show field codes. Display the Find dialog box
(Ctrl+F). In the "Find what" box, type ^d. Use the Find Next button to move
between REF fields.
 
S

Suzanne S. Barnhill

Or use ^d REF if you just want to find REF fields and no others.
Alternatively, F11 will go to the next field even when field codes aren't
displayed.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
P

Paul

OK...thanks.

Now I'm going to be selfish.

Is there a way to only search for REF fields, but not have to turn on
field codes? I want to be able to see what the field code evaluates
to, as I'm going from field code to field code.

Finally, is there a native keyboard shortcut for Next Find? If not,
I'll use a macro.

Thanks.
 
S

Suzanne S. Barnhill

Find Next, if you're just finding (not replacing) is Enter while the Find
dialog is open. Or you can use the double-down-arrow button at the bottom of
the vertical scroll bar; the keyboard equivalent of that (BrowseNext, which
in this case is Next Find/Go To) is Ctrl+PageDown.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

OK...thanks.

Now I'm going to be selfish.

Is there a way to only search for REF fields, but not have to turn on
field codes? I want to be able to see what the field code evaluates
to, as I'm going from field code to field code.

Finally, is there a native keyboard shortcut for Next Find? If not,
I'll use a macro.

Thanks.
 
G

Graham Mayor

The following macro will work

Dim oField As Field
For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldRef Then
oField.Select
MsgBox oField.Code
End If
Next oField


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Paul

Thank you, Graham!

The following macro will work

Dim oField As Field
For Each oField In ActiveDocument.Fields
    If oField.Type = wdFieldRef Then
        oField.Select
        MsgBox oField.Code
    End If
Next oField
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top