Skip to content

Instantly share code, notes, and snippets.

@japborst
japborst / InsertCrossReference.vb
Created January 16, 2017 10:39
Simple cross-reference macros for auto selecting appropriate boxes
' Because inserting cross-references is terrible in Word, these macros
' makes life a little easier by selecting the appropriate drop-down boxes
' Open issue: NumLock may be disabled
Sub InsertFigureReference()
' Reference a Figure and insert Only label and number
With Application.Dialogs(wdDialogInsertCrossReference)
SendKeys "ff{TAB}{DOWN 2}{ENTER}", True
.InsertAsHyperLink = 1
.InsertPosition = 0
.Show