Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / September 2005

Tip: Looking for answers? Try searching our database.

Items.Restrict.Count can't count?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oz Kologlu - 20 Sep 2005 02:51 GMT
Hi all,

I'm trying to get a list of appointments for the following month using
restrict eg:

Items items = aptFolder.Items.Restrict(
"[My.Id] <> '' " +
"AND [Start] >= '" + DateTime.Now.ToShortDateString() + "' " +
"AND [Start] <= '" + DateTime.Now.AddMonths(1).ToShortDateString() + "'" +
"AND [MessageClass] = 'IPM.Appointment'");

items.Count  returns 3 when there are only _2_ appointments!

It seems count is including some com object as the first item in the list.
Does anyone have any idea what it is or why I get an extra object and count
actually can't?

Thanks,
Oz
Oz Kologlu - 20 Sep 2005 02:59 GMT
BTW, they are not recurring appointments so that should not be the problem.
I do have other appointments that shouldn't and don't get returned by the
filter.

Thanks
Oz

> Hi all,
>
[quoted text clipped - 15 lines]
> Thanks,
> Oz
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.