Adding complex cross-reference

G

Guest

Hi,

in my documents I need to add quite a lot of cross-references. They also
need to be of the type which will say " 3.4.13 How to kill a hamster, p.
49".

Currently the only way for me to do this is to use my keyboard shortcut to
bring up the corss reference window, select the paragraph and then use the
dropdown menu 3 times to add the correct reference fields.

This is very manual process, but I have not been able to automate it any
more. I would think that this would be a standard requirement when writing
long and complex documents.

Does anybody have any suggestions how it could be made easier?

Thanks,

R.
 
J

Jezebel

It's not so hard to write a macro for it. Create a user form with a list box
that you populate with the headings in the document. When you select a
heading as target, you need to check if it has a bookmark. (You can see how
Word does this by adding a few cross-references, then display the bookmarks
dialog and check the 'Show hidden bookmarks' checkbox. Bookmarks that begin
with an underscore can be added only through VBA, and are normally hidden.)
You can use any bookmark for the heading, as long as it's unique.

Then add the line containing the cross-reference fields.

The version I use has options on the User form for 'See ...' and 'on page
xx', etc.
 
G

Guest

Hi Jezebel,

thanks, you've validated my thinking. Would you be able to post your source?
I've already tried searching the net to no avail, hence I ended up here. I'm
happy to put some effort in, but am by no means keen on spending time
developing a solution from scratch; although I can do bit of programming,
I'm quite unfamiliar with VBA. I'm looking at this from purely a user
perspective.

Many thanks in advance,

R.
 
J

Jezebel

Unfortunately, the code wouldn't help you in this case. It's part of a much
larger (commercial) application written in VB rather than VBA, and the code
in question does several other things apart from inserting a complex
cross-reference: a) it deals with external references also -- hyperlinks to
related documents, and b) it applies other formatting changes -- depending
on the document format -- so that in addition to the text cross-reference
there is also an IDEF-like drill down from task to sub-task.
 

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