Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bold all cross-references

556 views
Skip to first unread message

Ron

unread,
Aug 28, 2006, 2:49:16 AM8/28/06
to
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.


garfield-n-odie [MVP]

unread,
Aug 28, 2006, 2:55:12 AM8/28/06
to
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.

Ron

unread,
Aug 28, 2006, 3:28:47 AM8/28/06
to
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.


"garfield-n-odie [MVP]" <garfie...@discussions.microsoft.com> wrote in
message news:u9e3p7my...@TK2MSFTNGP02.phx.gbl...

Jezebel

unread,
Aug 28, 2006, 4:24:32 AM8/28/06
to
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.

"Ron" <ronal...@iei.com.tw> wrote in message
news:%23fOGfOn...@TK2MSFTNGP04.phx.gbl...

Stefan Blom

unread,
Aug 28, 2006, 6:31:01 AM8/28/06
to
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


"Jezebel" wrote in message
news:eBtf6tny...@TK2MSFTNGP03.phx.gbl...

Ron

unread,
Aug 29, 2006, 1:03:37 AM8/29/06
to
The truth is, I more often copy within documents than between documents.

My problem is that my documents are laid out with repetetive steps, like
this:

1. - description of something with cross-references to the following table
and figure
- table of something (with a table caption)
- figure of something (with a figure caption)

2. same as 1., etc...

So, you see how easy it is for me to simply copy and paste everything from
1. to 2., then 3., etc., and just do some simle editing of my text and
switch out the table/figure info. The nice thing is that all the captions
auto-update, but the cross-references stay tied to their first instances.

That's why I wondered if there were some programatic way to get the
cross-references to auto-update just as the captions do.

Now, this is in most cases; however, I would still need "standard"
cross-references in my document that I could use to refer to things like
headings or numbered items in other locations.

And another annoyance...

I just hate how Word always "jumps" back to the top of the listbox when I
want to insert another cross-reference. Wouldn't it make more sense that I
would like to insert reference 6-35 after 6-34 instead of going all the way
back to 1-1? And if that weren't irritating enough, I also hate how Word
never "remembers" that I ALWAYS want my cross-references inserted as "only
label and number"; but to do that I can't switch my reference type from
figures to tables, which means I have to insert all my table
cross-references first before I can insert my figure cross-references if I
want to save a little time.

Thanks everyone, your comments are really appreciated.


0 new messages