Re: Or in IF doesn't work...
- From: "Michael Bauer [MVP - Outlook]" <mb@xxxxxxxx>
- Date: Tue, 21 Nov 2006 07:12:33 +0100
I don't see any error in the code. So probably the To property contains
neither "Lisa" nor "Anna".
BTW: You waste the benefit of that function by calling it twice for the same
property. You should either call InStr directly or call the Contains
function like this:
If Contains(Item.To, "Lisa", "Anna") Then...
The InStr function in your sample is case-sensitive. If you don't want to
care about upper or lower cases then use:
If InStr(1, spBody, slText, vbTextCompare) then ...
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
Am 20 Nov 2006 04:59:24 -0800 schrieb info@xxxxxxxxx:
Well no, but nothing happens. I forgot to mention what I want to do,.
the macro ask if I want to add a flag to the maill in the sent box if
it match the criteria. And that there the problem is, it doesn't ask.
So there has to be something wrong with the IF statment.
Michael Bauer [MVP - Outlook] skrev:
Do you get an error?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --
- References:
- Or in IF doesn't work...
- From: info
- Re: Or in IF doesn't work...
- From: Michael Bauer [MVP - Outlook]
- Re: Or in IF doesn't work...
- From: info
- Or in IF doesn't work...
- Prev by Date: Re: macro that checks if email is duplicate
- Next by Date: Re: Counting days
- Previous by thread: Re: Or in IF doesn't work...
- Next by thread: Copy Internet Calendar appointment
- Index(es):
Relevant Pages
|