Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Opening many shared calendars fails (http://www.outlookbanter.com/outlook-vba/72670-opening-many-shared-calendars-fails.html)

Rasmus Wätjen May 27th 08 10:44 PM

Opening many shared calendars fails
 
Hi.
We are experiencing that when a user opens more than about 70 calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it reaches
about 70. So we reproduced the problem by manually doing the same thing. For
some reason the COM interface adds the calendar folders in the "People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus


Dmitry Streblechenko May 27th 08 11:53 PM

Opening many shared calendars fails
 
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote in
message ...
Hi.
We are experiencing that when a user opens more than about 70 calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same thing.
For
some reason the COM interface adds the calendar folders in the "People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus




Rasmus Wätjen May 28th 08 07:26 AM

Opening many shared calendars fails
 
The calendar information is needed in a telephone switchboard application. -
The user has a list of all coworkers where their daily schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] = midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the folders,
and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
Hi.
We are experiencing that when a user opens more than about 70 calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same thing.
For
some reason the COM interface adds the calendar folders in the "People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus





Dmitry Streblechenko May 28th 08 06:16 PM

Opening many shared calendars fails
 
You need to release *all* the variables that point to the objects from that
mailbox (calendaritems, calendarfolder).
Move the code that opens and process a particular mailbox to a separate
sub - this way all local variables will be automatically released when the
sub exits.
If you are using .Net, GC.Collect would also be a good idea.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote in
message ...
The calendar information is needed in a telephone switchboard
application. - The user has a list of all coworkers where their daily
schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] = midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the folders,
and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
Hi.
We are experiencing that when a user opens more than about 70 calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same thing.
For
some reason the COM interface adds the calendar folders in the "People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus







Rasmus Wätjen June 2nd 08 02:41 PM

Opening many shared calendars fails
 
I am using Delphi, so no garbage collection.
I am pretty sure that all variables are now set to Unassigned after every
calendar read, but the problem prevails.

Is there a way to remove a calendar from the "People's calendars" list in
Outlook?
I wonder why the other peoples calendar's are added to that list, when our
program reads the calendars using the object model. But maybe if the program
could remove the entries from that list after Outlook has added them, we
would be able to work around the problem.

Rasmus

"Dmitry Streblechenko" wrote in message
...
You need to release *all* the variables that point to the objects from
that mailbox (calendaritems, calendarfolder).
Move the code that opens and process a particular mailbox to a separate
sub - this way all local variables will be automatically released when the
sub exits.
If you are using .Net, GC.Collect would also be a good idea.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
The calendar information is needed in a telephone switchboard
application. - The user has a list of all coworkers where their daily
schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] = midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the folders,
and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
Hi.
We are experiencing that when a user opens more than about 70
calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same
thing. For
some reason the COM interface adds the calendar folders in the
"People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus







Dmitry Streblechenko June 2nd 08 05:45 PM

Opening many shared calendars fails
 
Delphi releases all interface type variables when they go out of scope, i.e.
when the method where they are declared exits or, in case of the class
variables, the class is destroyed.
Are you using multiple dot notation?
Again, do try my suggestion and see if it helps.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote in
message ...
I am using Delphi, so no garbage collection.
I am pretty sure that all variables are now set to Unassigned after every
calendar read, but the problem prevails.

Is there a way to remove a calendar from the "People's calendars" list in
Outlook?
I wonder why the other peoples calendar's are added to that list, when our
program reads the calendars using the object model. But maybe if the
program could remove the entries from that list after Outlook has added
them, we would be able to work around the problem.

Rasmus

"Dmitry Streblechenko" wrote in message
...
You need to release *all* the variables that point to the objects from
that mailbox (calendaritems, calendarfolder).
Move the code that opens and process a particular mailbox to a separate
sub - this way all local variables will be automatically released when
the sub exits.
If you are using .Net, GC.Collect would also be a good idea.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
The calendar information is needed in a telephone switchboard
application. - The user has a list of all coworkers where their daily
schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] =
midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the
folders, and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this
wrote in message ...
Hi.
We are experiencing that when a user opens more than about 70
calendars.
Outlook fails with the message like "Unable to display the folder. The
information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same
thing. For
some reason the COM interface adds the calendar folders in the
"People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus









Rasmus Wätjen June 2nd 08 10:03 PM

Opening many shared calendars fails
 
I am not sure what you mean by multiple dot notation.

I have rewritten the code, so that a function is called for each calendar to
be read, but unfortunately the problem is still there.
That function calls other functions for each part of the read: Resolve the
other user, open the folder, get the items collection, etc.
All variants are set to Unassigned after use, the only ones reused for
reading several calendars are the Outlook.Application OLE object, and the
namespace reference. These are set to Unassigned in the event of an error.

Rasmus




"Dmitry Streblechenko" wrote in message
...
Delphi releases all interface type variables when they go out of scope,
i.e. when the method where they are declared exits or, in case of the
class variables, the class is destroyed.
Are you using multiple dot notation?
Again, do try my suggestion and see if it helps.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
I am using Delphi, so no garbage collection.
I am pretty sure that all variables are now set to Unassigned after every
calendar read, but the problem prevails.

Is there a way to remove a calendar from the "People's calendars" list in
Outlook?
I wonder why the other peoples calendar's are added to that list, when
our program reads the calendars using the object model. But maybe if the
program could remove the entries from that list after Outlook has added
them, we would be able to work around the problem.

Rasmus

"Dmitry Streblechenko" wrote in message
...
You need to release *all* the variables that point to the objects from
that mailbox (calendaritems, calendarfolder).
Move the code that opens and process a particular mailbox to a separate
sub - this way all local variables will be automatically released when
the sub exits.
If you are using .Net, GC.Collect would also be a good idea.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
The calendar information is needed in a telephone switchboard
application. - The user has a list of all coworkers where their daily
schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] =
midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the
folders, and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this
wrote in message ...
Hi.
We are experiencing that when a user opens more than about 70
calendars.
Outlook fails with the message like "Unable to display the folder.
The information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same
thing. For
some reason the COM interface adds the calendar folders in the
"People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus










Dmitry Streblechenko June 2nd 08 10:18 PM

Opening many shared calendars fails
 
By multiple notation I mean something like
MAPIFolder.Items.Count
The compiler will store the result of the call to MAPIFolder.Items in an
implciit variable that you canot explicilty access and release.

What is your latest code?


--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote in
message ...
I am not sure what you mean by multiple dot notation.

I have rewritten the code, so that a function is called for each calendar
to be read, but unfortunately the problem is still there.
That function calls other functions for each part of the read: Resolve the
other user, open the folder, get the items collection, etc.
All variants are set to Unassigned after use, the only ones reused for
reading several calendars are the Outlook.Application OLE object, and the
namespace reference. These are set to Unassigned in the event of an error.

Rasmus




"Dmitry Streblechenko" wrote in message
...
Delphi releases all interface type variables when they go out of scope,
i.e. when the method where they are declared exits or, in case of the
class variables, the class is destroyed.
Are you using multiple dot notation?
Again, do try my suggestion and see if it helps.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote
in message ...
I am using Delphi, so no garbage collection.
I am pretty sure that all variables are now set to Unassigned after
every calendar read, but the problem prevails.

Is there a way to remove a calendar from the "People's calendars" list
in Outlook?
I wonder why the other peoples calendar's are added to that list, when
our program reads the calendars using the object model. But maybe if the
program could remove the entries from that list after Outlook has added
them, we would be able to work around the problem.

Rasmus

"Dmitry Streblechenko" wrote in message
...
You need to release *all* the variables that point to the objects from
that mailbox (calendaritems, calendarfolder).
Move the code that opens and process a particular mailbox to a separate
sub - this way all local variables will be automatically released when
the sub exits.
If you are using .Net, GC.Collect would also be a good idea.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this
wrote in message ...
The calendar information is needed in a telephone switchboard
application. - The user has a list of all coworkers where their daily
schedule is shown.

The calendars are read similar to this:
outlook = GetActiveOleObject('outlook.application');
namespace = outlook.GetNameSpace('MAPI');
while more contacts do
contact = namespace.CreateRecipient(otherusersalias);
calendarfolder = namespace.GetSharedDefaultFolder(contact,
olFolderCalendar);
calendaritems = calendarfolder.Items;
calendaritems.Sort('[Start]');
calendaritems.IncludeRecurrences = true;
restriction = '[Start] = midnighttoday and [End] =
midnightyesterday';

while more items do
// read calendar times
done;
calendarfolder = Unassigned;
done;

I'm assuming that the final Unassigned assignment will close the
folders, and remove references?

Is there something missing, or should it be done differently?

Thank you.

Best regards,
Rasmus



"Dmitry Streblechenko" wrote in message
...
Why do you need to *simultaneously* open that many folders?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this
wrote in message ...
Hi.
We are experiencing that when a user opens more than about 70
calendars.
Outlook fails with the message like "Unable to display the folder.
The information
store could not be opened".

Actually we found the problem because we have an app which reads all
calendars (using the COM interface to Outlook) and it fails when it
reaches
about 70. So we reproduced the problem by manually doing the same
thing. For
some reason the COM interface adds the calendar folders in the
"People's
Calendars" list in the left side of Outlook.

This is Outlook 2003 SP2.
Has anybody else seen this, or know a fix for it?

Best regards,
Rasmus












Rasmus Wätjen June 3rd 08 08:10 AM

Opening many shared calendars fails
 
"Dmitry Streblechenko" wrote
By multiple notation I mean something like
MAPIFolder.Items.Count
The compiler will store the result of the call to MAPIFolder.Items in an
implciit variable that you canot explicilty access and release.

Ok. I don't use that at all.

What is your latest code?

The code is paraphrased below. Exception handling etc. have been removed for
easier readability. On exceptions, all variants are set to Unassigned, and
the outlook connection (the OLE object and namespace references) are also
set to Unassigned;
The only global variant variables are FOutlook and FNamespace. The
appointment's EntryID is stored in a variant in my own data object, but I
can't see how that would leave references unreleased.

The code to read one calendar is:
function ImportFromCalendar(emailaddress: String) : TObjectList;
begin
if not connectedtooutlook then
ConnectToOutlook; // create ole object and get MAPI Namespace
reference

CalendarFolder := GetCalendarFolder(emailaddress);

items := GetCalendarItems(CalendarFolder);

Result := TObjectList.Create;
for i:= 0 to items.Count-1 do
begin
Appointment := items.item[i];
newapp := TCalendarAppointment.Create;
ExtractAppointmentInfo(Appointment, newapp);
Result.Add(newapp);
end;
Appointment := Unassigned;
items := Unassigned;
CalendarFolder := Unassigned;
end;

procedure ConnectToOutlook;
begin
try
FOutlook := GetActiveOleObject('outlook.application');
except
FOutlook := CreateOleObject('outlook.application');
end;

FNamespace := FOutlook.GetNamespace('MAPI');
end;

function GetCalendarFolder(emailaddress) : Variant;
var
otheruser : Variant;
begin
OtherUser := FNamespace.CreateRecipient(emailaddress);
Result := GetSharedDefaultFolder(OtherUser, olFolderCalendar);
end;

function GetCalendarItems(CalendarFolder): Variant;
var
sRestriction : String;
begintime, endtime : TDateTime;
begin
// begintime and endtime are assigned so they point to today and
tomorrow at midnight, because I am only interested in today's appointments
Result := CalendarFolder.Items;
Result.Sort('[Start]');
Result.IncludeRecurrences := True;

// I am only interested in today's appointments,
sRestriction := '[Start] = ''' + FormatDateTime(shortdateformat + ' ' +
shorttimeformat, endtime) + '''' +
' and [End] = ''' + FormatDateTime(shortdateformat + ' '
+ shorttimeformat, begintime) + '''';

Result := Result.Restrict(sRestriction);
end;

function ExtractAppointmentInfo(Appointment: Variant; newitem :
TCalendarAppointment) : Boolean;
begin
newitem.Subject := Appointment.Subject;
newitem.Begintime := Appointment.Start;
newitem.Endtime := Appointment.End;
if appointment.sensitivity = 2 then
newitem.Subject := newitem.Subject + ' (Private)';
newitem.BusyStatus := Appointment.BusyStatus;
newitem.EntryID := Appointment.EntryID;
end;




Dmitry Streblechenko June 3rd 08 07:51 PM

Opening many shared calendars fails
 
Hmmmm... Looks good to me. I wonder if Outlook internally keeps all the
fodlers/items from the shared folders returned by GetSharedDefaultFolder
BTW, the Items collection in OOM is 1, not 0 based.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Rasmus Wätjen" -also-remove-this wrote in
message ...[i]
"Dmitry Streblechenko" wrote
By multiple notation I mean something like
MAPIFolder.Items.Count
The compiler will store the result of the call to MAPIFolder.Items in an
implciit variable that you canot explicilty access and release.

Ok. I don't use that at all.

What is your latest code?

The code is paraphrased below. Exception handling etc. have been removed
for easier readability. On exceptions, all variants are set to Unassigned,
and the outlook connection (the OLE object and namespace references) are
also set to Unassigned;
The only global variant variables are FOutlook and FNamespace. The
appointment's EntryID is stored in a variant in my own data object, but I
can't see how that would leave references unreleased.

The code to read one calendar is:
function ImportFromCalendar(emailaddress: String) : TObjectList;
begin
if not connectedtooutlook then
ConnectToOutlook; // create ole object and get MAPI Namespace
reference

CalendarFolder := GetCalendarFolder(emailaddress);

items := GetCalendarItems(CalendarFolder);

Result := TObjectList.Create;
for i:= 0 to items.Count-1 do
begin
Appointment := items.item;
newapp := TCalendarAppointment.Create;
ExtractAppointmentInfo(Appointment, newapp);
Result.Add(newapp);
end;
Appointment := Unassigned;
items := Unassigned;
CalendarFolder := Unassigned;
end;

procedure ConnectToOutlook;
begin
try
FOutlook := GetActiveOleObject('outlook.application');
except
FOutlook := CreateOleObject('outlook.application');
end;

FNamespace := FOutlook.GetNamespace('MAPI');
end;

function GetCalendarFolder(emailaddress) : Variant;
var
otheruser : Variant;
begin
OtherUser := FNamespace.CreateRecipient(emailaddress);
Result := GetSharedDefaultFolder(OtherUser, olFolderCalendar);
end;

function GetCalendarItems(CalendarFolder): Variant;
var
sRestriction : String;
begintime, endtime : TDateTime;
begin
// begintime and endtime are assigned so they point to today and
tomorrow at midnight, because I am only interested in today's appointments
Result := CalendarFolder.Items;
Result.Sort('[Start]');
Result.IncludeRecurrences := True;

// I am only interested in today's appointments,
sRestriction := '[Start] = ''' + FormatDateTime(shortdateformat + ' '
+ shorttimeformat, endtime) + '''' +
' and [End] = ''' + FormatDateTime(shortdateformat + ' '
+ shorttimeformat, begintime) + '''';

Result := Result.Restrict(sRestriction);
end;

function ExtractAppointmentInfo(Appointment: Variant; newitem :
TCalendarAppointment) : Boolean;
begin
newitem.Subject := Appointment.Subject;
newitem.Begintime := Appointment.Start;
newitem.Endtime := Appointment.End;
if appointment.sensitivity = 2 then
newitem.Subject := newitem.Subject + ' (Private)';
newitem.BusyStatus := Appointment.BusyStatus;
newitem.EntryID := Appointment.EntryID;
end;







All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com