forex trading logo

Login


 

Highlighting

User Rating:  / 0
PoorBest 


The following code highlights marked text in the respective color.


Sub Red()

    Options.DefaultHighlightColorIndex = wdRed
    Selection.Range.HighlightColorIndex = wdRed
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub

----------
Sub Yellow()
    Options.DefaultHighlightColorIndex = wdYellow
    Selection.Range.HighlightColorIndex = wdYellow
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub

----------
Sub Green()
    Options.DefaultHighlightColorIndex = wdBrightGreen
    Selection.Range.HighlightColorIndex = wdBrightGreen
    Selection.MoveRight Unit:=wdCharacter, Count:=1
End Sub


The following code removes the highlighting from the marked or the entire text.


Sub RemoveEntireHighlighting()
    Selection.WholeStory
    Options.DefaultHighlightColorIndex = wdNoHighlight
    Selection.Range.HighlightColorIndex = wdNoHighlight
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub

----------
Sub RemoveSelectedHighlighting()
    On Error GoTo Bye
    Options.DefaultHighlightColorIndex = wdNoHighlight
    Selection.Range.HighlightColorIndex = wdNoHighlight
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub


 

Powered by Joomla!. Design by: joomla templates download  Valid XHTML and CSS.