View Single Post
 
Old 05-17-2011, 08:54 PM
b0x4it b0x4it is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: May 2011
Posts: 95
b0x4it is on a distinguished road
Default Change EndNote citations color

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
Reply With Quote