Ich möchte "Proc. Natl. Acad. Sci "in dem Artikel, ihn durch" Proc. Natl. Acad. Sci. USA "und hebt es als grün hervor.
Ich schrieb den folgenden Code. Es nur markiert "Proc. Natl. Acad. Sci. "Als grün und nicht markiert USA als grün. Wie kann ich ganz markieren "Proc. Natl. Acad. Sci. USA "wie grün?Markieren Sie den Ersatz des Inhalts
Sub add_usa()
selection.find.clearforamtting
With selection.Find
.Text = "Proc. Natl. Acad. Sci. "
.Wrap = wdFindContinue
.Forward = True
.MatchCase = False
.MatchWildcards = False
Do
.Execute
If .Found And selection.Range.Next(wdCharacter, 1) <> "U" Then
selection.Range.InsertAfter "USA "
selection.Range.HighlightColorIndex = wdBrightGreen
End If
If Not .Found Then
Exit Do
End If
Loop
End With
End Sub