A
avkokin
Hello. There is a certain text which contains some words with upper
case character (not only first words into the sentences). I want to
apply color to this upper case characters into selection of text . I
wrote the small code, but it runs only for first words of sentences
into selection of text:
Sub colorCase()
Dim fChar As Range
Dim selText As Range
Set selText = Selection.Range
If Selection.Type = wdSelectionIP Then
MsgBox "Don't selection of text"
Else
For Each fChar In selText.Sentences
fChar.Characters.First.Font.Color = wdColorRed
Next fChar
End If
End Sub
Please help me. Thank you very much.
case character (not only first words into the sentences). I want to
apply color to this upper case characters into selection of text . I
wrote the small code, but it runs only for first words of sentences
into selection of text:
Sub colorCase()
Dim fChar As Range
Dim selText As Range
Set selText = Selection.Range
If Selection.Type = wdSelectionIP Then
MsgBox "Don't selection of text"
Else
For Each fChar In selText.Sentences
fChar.Characters.First.Font.Color = wdColorRed
Next fChar
End If
End Sub
Please help me. Thank you very much.