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)
If objRecipient.Resolved Then
Set objAddressEntry = objRecipient.AddressEntry
strFreeBusy = objAddressEntry.GetFreeBusy(#7/7/2009#, 60)
Set objAddressEntry = Nothing
Set objRecipient = Nothing
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
Alan Moseley IT Consultancy
If I have solved your problem, please click Yes below. Thanks.
> 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,
> "Alan Moseley" wrote:
> > You need to use the GetFreeBusy method of the AddressEntry object to do this.
> > > > Alan Moseley IT Consultancy
> > http://www.amitc.co.uk
> > If I have solved your problem, please click Yes below. Thanks.
> > "Alberto_5015" wrote:
> > > 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