Querying Outlook items

  • Thread starter Johnny E. Jensen
  • Start date
J

Johnny E. Jensen

Hey Group

I have made a routine that fetches some outlook appointments using the
Items.Find method. The Query looks like [Start] >= "01-02-2007 00:00" and
[Start] <= "06-02-2007 23:59"

I works just fine and with good performance.

Another routine i want tobuild is to fetch items from the Inbox and also
using the query method Find. But I'am not sure what the query field name is.
I've trying with the [ReceivedTime] >= "01-02-2007 12:00:00" and
[ReceivedTime] <= "06-02-2007 23:59:59"

The date format is in Danish, i'ev tryed with US format 2007/02/01 but i'll
get the error:
Type mismatch or the value "{date}" in the condition is not valid.

Can anyone help me here, I don't like the way of fetching all items within
the inbox folder, and then drill though to fetch items that meets the above
query for ReceivedTime. Not a good performance, and when keep in mind, after
the inbox i'll also have to get the sentbox ....


Kind regards
Johnny E Jensen
 
K

Ken Slovak - [MVP - Outlook]

Try leaving off the seconds for any Find or Restrict.

For some properties where a time isn't shown you also leave off the hours
and minutes, such as Task.DueDate.
 

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