Insert Cross Reference Macro and Dialog Box
Posted on 2005-05-17
I wrote a mini macro as follows:
Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.Style = ActiveDocument.Styles("Default Paragraph Font")
It merely shows the cross-reference dialog and makes the inserted cross reference bold.
However, I can't get the box that says "Insert As Hyperlink" to stay checked when I run the macro.
If I click Insert, Cross Reference, the box is checked.
If I click Alt F8 and run the Insert Cross Reference macro, the box is checked.
But if I click my toolbar button that runs the above macro, the box is unchecked.
If I run the following line of code, the box is unchecked.
I can't figure out a way to keep that option checked - we always want to insert the cross reference as a hyperlink. I've never run across this before so I need your help.
Thanks in advance!