Calendar private appointments, an unresolved question...

A

Alberto_5015

In Outlook 2003's calendar view you can see a placeholder for a private
appointment in another person's calendar.

There is a way to retrive non-confidential information (start, end and
free/busy status) by vba or it is impossible???

Thanks in advance,
Alberto
 
A

Alan Moseley

You need to use the GetFreeBusy method of the AddressEntry object to do this.
 
A

Alberto_5015

Hi Alan, thanks for the hint!

I'm trying to do some experiments with the the GetFreeBusy method,
but it seems a little unpredictable...
Sometimes I got the right day and hour of an hidden appointment,
but sometime they are wrong!

And how can I find the end of the appointment???

Can anyone post a little example?

Thanks in advance,
Alberto
 
A

Alan Moseley

GetFreeBusy does not get the start and end times of appointments as you have
probably figured out. If a user has created an appointment in their
calendar, it will detect whether they have set the 'Show Time As' box to free
or busy. If the user has not done this then the method will not return the
information that you are expecting. Some sample code:-

Public Function GetFreeBusyOfSomeone(Person As String) As String
Dim objRecipient As Recipient
Dim objAddressEntry As AddressEntry
Dim strFreeBusy As String

Set objRecipient = Outlook.Session.CreateRecipient(Person)
objRecipient.Resolve
If objRecipient.Resolved Then
Set objAddressEntry = objRecipient.AddressEntry
strFreeBusy = objAddressEntry.GetFreeBusy(#7/7/2009#, 60)
Set objAddressEntry = Nothing
End If
Set objRecipient = Nothing
GetFreeBusyOfSomeone=strFreeBusy
End Sub

This gets a string showing Fred Bloggs free or busy status starting on the
7th July in 60 minute intervals for the next 30 days. Therefore if the first
character in the string is a 0 then the person is free from 00:00 till 01:00.
If it is a 1 then the person is marked as busy from 00:00 to 01:00, and so
on.
 

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