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
 
Top