By mis-adventure I often enough end up with hyperlinks in a mish-mash of cases.
I'd like all the hyperlinks to conform to a consistent standard.
Sub ConvertHyperlinksToProperCase()Dim HLNK As Hyperlink
For Each HLNK In ActiveDocument.Hyperlinks
With HLNK
Dim strTextToDisplay As String
strTextToDisplay = .TextToDisplay
.TextToDisplay = StrConv(strTextToDisplay, vbProperCase)
End With
Next HLNK
End Sub
This little macro does that.
Note that it processes EVERY hyperlink in the current document, which is fine for me.
If you wanted it to operate only on a selected area you could change one line to read
For Each HLNK In Selection.Hyperlinks
No comments:
Post a Comment