Crossreference shortcut

P

PBezucha

Hallo,
When many times cross-referencing the captures,
ie. ,Tab.', it is tiring to re-direct repeatedly the
default ,EntireCaption' to ,OnlyLabelAndNumber' and to
select "Tab.' kind. It may be surely done by means of a
macro linked to shortcut keys, now only ReferenceItem
should remain to choose. But - what mistake am I doing in
the following attempt, if the result after Execute is
invariably Run-time error ,4198' ?

Sub CrossRefTab()
Set D = Application.Dialogs(wdDialogInsertCrossReference)
D.ReferenceKind = wdOnlyLabelAndNumber
D.ReferenceType = "Tab."
D.Execute
D.Show
End Sub

("Tab." is not in the local offer)

Many thanks for a solution

Petr
 
D

Dave Lett

Hi Petr

The argument lists for the dialog boxes are buggy and undependable. In this case, I've found that you have to use the SendKeys to get the settings you want

SendKeys "%t{DOWN 7}%r{DOWN 1}{ENTER}
Set d = Application.Dialogs(wdDialogInsertCrossReference
d.Sho

HTH
Dave
 

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

Similar Threads


Top