9

I've got a very long document that uses multi-level numbering. I'm wanting to include cross-references (with hyperlinks) back and forth to particular sections, and I've been using the standard Word cross-referencing feature, which adds fields like this:

{ REF _Ref391986184 \r \h }

This results in section references that look like this:

5.4

I'd really like the field to be formatted like this:

Section 5.4

and have the field automatically include the 'Section' part (so it ends up being a hyperlink as well).

I've been playing around with the REF field code's switches but I can't find anything that lets me format like this. The closest I've got is:

REF _Ref394485517 \r \h \# "'Section' 0.0"

At first glance this looks right as it outputs:

Section 5.4

However if the section being referred to has three parts (e.g. section 5.4.1), then this will only display the 5.4.

Is there another way to do this to achieve what I want?

1 Answer 1

9
{ REF _Ref394485517 \r \h \#"'Section '" }{ REF _Ref394485517 \r \h }

If necessary, change the space after "Section" to a non-breaking space.

(NB, it can only work if the numbering contains at least one digit, e.g. a numbering style A.A.A would break this. AFAIK 1.2.3 etc. are OK even though they are not well-formed numbers as far as Word is concerned).

2
  • Thanks. This works! I was hoping to find a way of doing it in a single field so I could use Find and Replace to change this, but I'll just write a macro. Thanks.
    – John
    Aug 12, 2014 at 7:08
  • Can you answer the question in the following link? Thank you. superuser.com/questions/1647346/…
    – likelee
    May 7, 2021 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.