I have a Macro which automatically finds a reference number in my document, then opens the Find Citation window by a keyboard shortcut, which automatically finds the right citation since the endnote ref. number is in the clipboard. The problem is I don’t see how I am able to automate the actual insertion, since Word won’t record any kind of commands to the Find Citation window (the Macro recorder doesn’t see any typing or clicking).
I thought I could see what command is passed when “Insert” is clicked in the macro application window, but the EndNote Cwyw TemplateProject is closed from viewing. Suggestions please?
This is what I have so far:
Sub AppxRefGen()
’
’ AppxRefGen Macro
’
’
Selection.Find.ClearFormatting
With Selection.Find
.Text = “#??”
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Application.Run MacroName:=“TemplateProject.NewMacros.ENFindCitations”
End Sub