Option
Explicit
Public
Sub
Fuellwoerter()
Dim
objWort
As
Range
Dim
avntArray()
As
Variant
Dim
enmFontColor
As
WdColor
Dim
ialngIndex
As
Long
avntArray = Array(
"aber"
,
"abermals"
,
"ich"
)
For
Each
objWort
In
ActiveDocument.Words
For
ialngIndex = 0
To
UBound(avntArray)
With
objWort
If
avntArray(ialngIndex) = LCase(Trim$(.Text))
Then
If
.Font.Color = wdColorWhite
Then
enmFontColor = wdColorAutomatic
Else
enmFontColor = wdColorWhite
End
If
Exit
For
End
If
End
With
Next
If
ialngIndex <= UBound(avntArray)
Then
Exit
For
Next
For
Each
objWort
In
ActiveDocument.Words
For
ialngIndex = 0
To
UBound(avntArray)
With
objWort
If
avntArray(ialngIndex) = LCase(Trim$(.Text))
Then
.Font.Color = enmFontColor
Exit
For
End
If
End
With
Next
Next
End
Sub