Ice-Tea-Jan
07-19-2011, 11:05 AM
Hello,
I wish to have VBA automatically populate the input box that is presented in this code with the string: “^?” (in order to find ANY character) in non-black text.
I’ve tried a number of things (including sendkeys, etc.) but I am truly spinning my wheels!
Can anybody offer me help on this?
Sub FindNotBlack()
With Selection.Find
.ClearFormatting
.Text = InputBox(prompt:="Enter the search text.", _
Title:="Find Nonblack Text")
Do While .Execute
With Selection.Font
If (.Color <> wdColorAutomatic) And _
(.Color <> wdColorBlack) Then
MsgBox "Found"
Exit Sub
End If
End With
Loop
End With
End Sub
Thanking you,
Janet:dunno
I wish to have VBA automatically populate the input box that is presented in this code with the string: “^?” (in order to find ANY character) in non-black text.
I’ve tried a number of things (including sendkeys, etc.) but I am truly spinning my wheels!
Can anybody offer me help on this?
Sub FindNotBlack()
With Selection.Find
.ClearFormatting
.Text = InputBox(prompt:="Enter the search text.", _
Title:="Find Nonblack Text")
Do While .Execute
With Selection.Font
If (.Color <> wdColorAutomatic) And _
(.Color <> wdColorBlack) Then
MsgBox "Found"
Exit Sub
End If
End With
Loop
End With
End Sub
Thanking you,
Janet:dunno