Reputation: 1175
Is there a way to apply style to hyperlink, without selecting it?
For example, this works:
Sub ChangeStyle()
Selection.Range.Hyperlinks(1).Range.Fields(1).Result.Select
Selection.Style = Word.WdBuiltinStyle.wdStyleHyperlinkFollowed
End Sub
But I don't like the gray selection area:
Here is what I try to accomplish:
Upvotes: 0
Views: 133
Reputation: 11755
Try it like this:
Sub ChangeStyle()
Selection.Range.Hyperlinks(1).Range.Fields(1).Result.Style = Word.WdBuiltinStyle.wdStyleHyperlinkFollowed
End Sub
Upvotes: 1