I am using the following code to make Endnote citations Blue for the purpose of having tagged pdf with blue links. The problem is that for the citation like [3], this code changes the color of the whole [3], but I want to change the color of just 3 and not the brackets. Is there any way to do that either by using VBA or through Endnote's setting?
Code:
Sub ChangeCitationColor()
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Color = wdColorBlue
End With
With Selection.Find
.Text = "^19 ADDIN EN.CITE"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
End Sub