Cross-Ref to "this" Caption in VBA?

E

Ed

Thanks to the heroic efforts of Jay Freedman and Suzanne Barnhill, I now
have half a handle on Captions and Cross-References. I think it will make
things easier - but first I have to implement these in a report already
written. I'm using these for table headers, and there's about 50 or so, so
I was going to put it all in a few quick macros to avoid a lot of repeated
motions.

Everything's okay, except for getting the cross-reference to automatically
choose the last / highest-numbered caption, which would be the one I just
put in. Every time I select Insert Cross-Reference, it gives me a list.
With the macro, I don't want to manually select the Caption - it will always
(for this effort) be the Caption I just inserted.

I couldn't see anything in the Help or VBA Help that would allow me to
specify which Caption to Cross-Reference. Any suggestions?

Ed
 
S

Suzanne S. Barnhill

You're not alone in finding this frustrating; the Bookmark dialog is one of
the most reviled in the Word UI, and Cross-reference is almost as bad. Be
grateful for the fact that it at least preserves your selection of
"Reference type" (Table) and "Insert reference to." Still, you should be
able to do what you want using VBA, but to get help with that VBA you'll
probably do better to post in one of the Word VBA NGs.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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