CDO: Calendar filtering problems - free/busy and start/end date

CDO: Calendar filtering problems - free/busy and start/end date

Post by Steffen Krau » Fri, 05 Feb 1999 04:00:00



I have several problems to filter calendars using CDO.

What I want to achieve:
- retrieve calendar entries of various users from date A to date B
- filter out entries that are 'free'

Notice that I retrieve the calendar folders from other users, so I get
Message items, not AppointmentItem's due to a bug.

Problems:

1.) How can I filter or at least retrieve the "Show time as" (free,
busy, Out of office etc.) property from a CDO item?

2.)

When I filter the calendar as follows:
        Set objUserMessages = objUserFolder.Messages

        Set objMessageFilter = objUserMessages.Filter

        objMessageFilter.Fields(CdoPR_START_DATE) = DateAdd("m", 6,
Now())

    objMessageFilter.Fields(CdoPR_END_DATE) = DateAdd("d", -7, Now())

I only get meeting items, no other (standard & recurring appointment)
items.

---------------------------------------------


Microsoft Certified Systems Engineer

 
 
 

CDO: Calendar filtering problems - free/busy and start/end date

Post by Siegfried Webe » Fri, 05 Feb 1999 04:00:00


It is documented that you can access only appointment items with the Session.GetDefaultFolder method of CDO. Take a look at the following KB article to understand how to filter appointment items with CDO:

http://support.microsoft.com/support/kb/articles/q178/5/08.asp

HTH

Siegfried


>I have several problems to filter calendars using CDO.

>What I want to achieve:
>- retrieve calendar entries of various users from date A to date B
>- filter out entries that are 'free'

>Notice that I retrieve the calendar folders from other users, so I get
>Message items, not AppointmentItem's due to a bug.

>Problems:

>1.) How can I filter or at least retrieve the "Show time as" (free,
>busy, Out of office etc.) property from a CDO item?

>2.)

>When I filter the calendar as follows:
> Set objUserMessages = objUserFolder.Messages

>    Set objMessageFilter = objUserMessages.Filter

>    objMessageFilter.Fields(CdoPR_START_DATE) = DateAdd("m", 6,
>Now())

>    objMessageFilter.Fields(CdoPR_END_DATE) = DateAdd("d", -7, Now())

>I only get meeting items, no other (standard & recurring appointment)
>items.

>---------------------------------------------


>Microsoft Certified Systems Engineer


 
 
 

CDO: Calendar filtering problems - free/busy and start/end date

Post by Dan Mitche » Fri, 05 Feb 1999 04:00:00



>            objMessageFilter.Fields(CdoPR_START_DATE) = DateAdd("m", 6,
>Now())

>    objMessageFilter.Fields(CdoPR_END_DATE) = DateAdd("d", -7, Now())

 I'm not exactly clear what you're doing here, but one weirdness of
filtering CDO calendars is that the END_DATE property has to be set to the
_start_ of the range of dates you want, and the START_DATE has to be set to
the _end_ of the range of dates you want. (ie, they're backwards).

 Once you've got this working, you should get everything from your calendar
folder that's in that range; recurring events are slightly weird, but you
get one instance of them for each recurrence in the period in question.
(ie if you search over a week, and you have a daily recurrence, you'll get
that recurrence seven times.)

 Note that changing instances of a recurrence may not do exactly what you
expect; experiment with this before assuming it's a bug, because Exchange
handles instances of recurring meetings in a slightly weird way.

 -- dan

 
 
 

CDO: Calendar filtering problems - free/busy and start/end date

Post by Dan Mitche » Sat, 06 Feb 1999 04:00:00



>I've already read this article, but I don't like this way because:
>1. I have to create a session for each user for which I want to copy
>the calendar (including user name/password!)
>2. Copying AppointmentItems is much harder than copying Messages ( I
>get everything as message the way I do it because of the CDO bug)

 Oh, right, you're doing things from an unusual folder; I think your best
bet here is to take this problem to microsoft.public.win32.programmer.mapi,
and ask about the calendar bug there; if you already know about the
GetDefaultFolder problem, then you know as much as anyone outside
Microsoft does.. If you ask in microsoft....mapi, there's a guy there who's
now at Microsoft who may have more possible solutions for you.

 Good luck,

 -- dan

 
 
 

1. Public Folder Appointment Items - Can not Set Start Date nor End Date

Imagine a Public Folder of Calendar Items. In cdo I can add a message
but I can not set the start or end times. I see the message being
created I can manipulate some custom fields, but I can not get to the
start or end fields. I read in the CDO guide in MSDN that I should not
be able to do this. Can I get a confirmation? I saw two other people
with the same error. Any ideas.

2. I want to archive items but NOT to a .pst

3. Free / Busy Exchange ( SEND / RECIEVE Free/Busy Information ) problems

4. Sql to Exchange contact synchronization

5. problems with free-busy-status and cdo.addresse

6. public folder view

7. Calendar free/busy problem

8. Should I upgrade Groupshield 4.0.4 to 4.5?

9. Outlook, Free\Busy problem, Unable to view calendar information

10. Start and End date of appointment from outlook

11. Calender events loosing start/end date

12. Lost my Free/Busy database (Schedule+ Free and Busy public folder)

13. Calender events loosing start/end date