Searching items for more than one criteria

P

Pat Curran

Hi;
My app uses the following code to search by subject:
myFind = myFolder.Items.Find(;
"[Subject] = '" + "This is my new title in Calendar" + "'")
if not type("myFind")= 'L'
myFind.delete()
myItem.Subject = "This is my replaced title in Calendar"
endif
myItem.save()

Some of my items will have the same subject, but be on different days. How
can I search for an item by subject and by date?

Thanks
Pat
 
S

Sue Mosher [MVP]

Add another expresion to the search string, combining the two expressions
with AND:

stringexpr AND date expr

See http://www.slipstick.com/dev/finddate.htm -- there are quite a few
subtle nuances to date search strings.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Pat Curran said:
Hi;
My app uses the following code to search by subject:
myFind = myFolder.Items.Find(;
"[Subject] = '" + "This is my new title in Calendar" + "'")
if not type("myFind")= 'L'
myFind.delete()
myItem.Subject = "This is my replaced title in Calendar"
endif
myItem.save()

Some of my items will have the same subject, but be on different days. How
can I search for an item by subject and by date?

Thanks
Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top