Cross-Referencing Dynamically Numbered Elements

J

Joshua

The Word Heretic recently wrote:

"never use dynamically generated reference targets - numbered lists,
headings etc. You may get away with it for a short while, but it will
always come to bite you in the back - especially when copying content!"

.... but I just recently set up numbered list template styles using VBA, and
implement numbered headings using Word's built-in Heading styles. I thought
this would make cross references like "refer to step Z in section X.Y"
behave and be stable.

Is this not true? Are they not stable? Will I have trouble cutting and
pasting such "dynamic" references?

Joshua
 
S

Shauna Kelly

Hi Joshua

You can use the functionality at Insert > Reference > Cross Reference. I've found it to be quite stable. In the Reference Type box,
choose Heading or Numbered Item. In the Insert Reference To box, choose Heading number. Don't choose Heading number (full context),
because it won't work properly in some circumstances.

There are two potential problems, both of which come about because of how Word does these cross references. It manages them by
creating invisible bookmarks around the thing being referenced. This has two consequences.

First, you can't cut and paste between documents, because Word won't be able to find the bookmarked reference in the new document.
You can cut and paste within documents, but you have to be careful because of the invisible bookmarks.

Second, it's easy to accidentally type or paste within the invisible bookmark. The classic case is that you have some text followed
by a heading and the heading is cross-referenced somewhere. You want to add more text before the heading, so you go to the beginning
of the heading paragraph and press Enter to create a new paragraph. And you type away. This leads to a mess because you've just
typed within the invisible bookmark. To avoid this, make sure you create new paragraphs by going to the *end* of the paragraph
before the heading, and press Enter there.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 

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