Hi Tony,
The path in .FoundFiles(i) *is* a string (or, technically, a variant
containing the equivalent of a string). That isn't your problem.
The problem is that your syntax is trying to use the Or operator to
combine strings,
"*red*" Or "*call*" Or "*knock" Or "early"
But that operator can accept only Boolean arguments. The correct
syntax, comparing the values of the Like operations, is
If (fs.FoundFiles(i) Like "*red*") Or _
(fs.FoundFiles(i) Like "*call*") Or _
(fs.FoundFiles(i) Like "*knock") Or _
(fs.FoundFiles(i) Like "early") Then
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
>Hi,
>
[quoted text clipped - 13 lines]
>
>Tony
Tony_at_work - 14 Dec 2006 13:24 GMT
Jay,
Many thanks for your assistance.
Tony
>Hi Tony,
>
[quoted text clipped - 26 lines]
>>
>>Tony