Bold all cross-references

R

Ron

Is there a simple macro that can bold all the cross-references in my doc?
It's been a few years since I've handled VB and I don't have the time to
fuddle my way through right now.

Thanks in advance.
 
G

garfield-n-odie [MVP]

You don't need a macro... you can use Find and Replace All to
search for REF fields and replace with Find What Text + Bold.
 
R

Ron

Works like a charm! Many thanks!!

Any advice on one of my old posts? Read on...

My basic problem is with keeping the numbering of my cross-references tied
to their respective captions. If I copy/move one section to another place in
my document, the captions can be updated, but their cross-references can't.

How can I keep a cross-reference "linked" to its corresponding caption
regardless of where I copy/move them to?

Here's an example.

Imagine the following is in section 2 of "document 1".

The physical dimensions of the ???? are listed below and shown in Figure
2-2.

(some image here)

Figure 2-2: ???? Physical Dimensions

So, the first sentence has a cross-reference (Figure 2-2) to the cation
(Figure 2-2) in the table.

Now, I copy the sentence and table above and paste it into section 5 of
"document 2". I update my fields and the following is the result.

The physical dimensions of the ???? are listed below and shown in Figure
2-2.

(some image here)

Figure 5-9: ???? Physical Dimensions

You see how the cross-reference remains as "Figure 2-2", but the caption
updates as Figure 5-9. That's because there's already a "Figure 2-2" in the
current document.

What I would like to have happen is that both the cross-reference and
caption update to the correct placement in the new document; updated to
"Figure 5-9" and Figure 5-9 for the above example.

In this way, you could imagine the cross-reference and caption are "linked"
together in some way and are always updated correctly regardless of where
they are pasted to in another document.

I hope this explanation helps.

Any suggestion would be appreciated.
 
J

Jezebel

Bookmark the target (the 2-2 in your example) then reference it using a REF
field. The bookmark will travel with the text if you move it (but not if you
copy it, because then the bookmark stays with the original); and the
cross-reference will remain correct.

Word normally does this automatically with cross-references anyway.
Experiment by inserting a few captions and references, then press Alt-F9 to
display field codes and compare what you see with the contents of the
Bookmarks list with 'Hidden bookmarks' checked.
 
S

Stefan Blom

But since the OP is copying into another document, the bookmark should
follow (unless a bookmark with an identical name is already present in
the target document).

--
Stefan Blom
Microsoft Word MVP


in message
 

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