Lost Cross-Reference dialog box

J

Jamie Bull

I was trying to record a macro to open the Insert Cross reference dialo
box (before realising that setting a custom keyboard shortcut was
better approach to take). Somehow I've managed to set things up so tha
when I click the button on the Ribbon (either vi
References>Captions>Cross-reference or vi
Insert>Links>Cross-reference), or when I use the Alt>etc.>etc. keyboar
shortcuts, the paragraph number of the first section is added withou
bringing up the dialog box.

Is there a way of resetting this to normal behaviour?

In case it's relevant, this is the macro as recorded.


Code
-------------------
Sub InsertCrossReference()
'
' InsertCrossReference Macro
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False, SeparateNumbers:=False, _
SeparatorString:=" "
End Sub
 
S

Stefan Blom

Since the macro is called "InsertCrossReference" it overrides the built-in
InsertCrossReference command. To fix this, either rename the sub or remove it
completely.

--
Stefan Blom
Microsoft Word MVP




"Jamie Bull" wrote in message
I was trying to record a macro to open the Insert Cross reference dialog
box (before realising that setting a custom keyboard shortcut was a
better approach to take). Somehow I've managed to set things up so that
when I click the button on the Ribbon (either via
References>Captions>Cross-reference or via
Insert>Links>Cross-reference), or when I use the Alt>etc.>etc. keyboard
shortcuts, the paragraph number of the first section is added without
bringing up the dialog box.

Is there a way of resetting this to normal behaviour?

In case it's relevant, this is the macro as recorded.


Code:
--------------------
Sub InsertCrossReference()
'
' InsertCrossReference Macro
'
Selection.InsertCrossReference ReferenceType:="Numbered item", _
ReferenceKind:=wdNumberRelativeContext, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False, SeparateNumbers:=False, _
SeparatorString:=" "
End Sub
 

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