F
Foths Mylo
Hallo my friends.
I ve searched enough newsgroups and internet sites, but didnt find any
reference to my problem.
i dont know if what im facing is specific to my installation, or a common
problem.
I'm trying to set reminders for apointments in the default calendar folder
of Outlook.
But i dont set them, as soon as i create the apointment. Instead, the
apointment is stored with no reminder at all, and later i open it and
process it, adding the reminder.
For this usage, i use the function "getitemfromid".
My code, is in Delphi, so for the majority of VB or VBA programers here, im
making some comments, although of course the object model is the same.
try
CoInitialize(nil); <----initialize com
objOL:=CoOutlookApplication.Create; <-----create the outlook aplication
ns:=objOL.GetNamespace('MAPI'); <-----get the namespace
myappf:=ns.GetDefaultFolder(olFolderCalendar); <-----get the default
calendar folder
objAppt:=ns.GetItemFromID(REminderID,myappf.StoreID) as AppointmentItem;
<-------------get the stored apointment item from the calendar folder
With objAppt do begin
//objAppt.Display(false); <---------this line is comented out (i dont
want the apoinment actually displayed) and unfortunately is the only
workaround i found so far, to my problem
ReminderMinutesBeforeStart:=(60 * 23) + 59; <--------set a reminder
time
ReminderSet:= True; <--------activate the item
objAppt.Save; <----save the reminder
//objAppt.Close(olSave); <-----------comented out as well
End;
finally
ns:=nil;
objOL:=nil;
objAppt:=nil;
couninitialize;
end;
i would like to ask, if some of you have faced the same situation:
If i set a reminder as soon as the apointment is created, everything seems
to be working fine.
If i create the apoitnment with no reminder, and then use my code, what
happens is this:
Everything seem to be stored perfectly ok, the reminder option is checked,
the time of the reminder is set as well, but no matter how long i wait for,
the reminder never comes up.
The only workaround for the reminder to come up, after editing the
apointment with GETITEMFROMID, is to display the item, change the properties
i need, save settings, and close the item.
But i dont want it to work this way, i would like all this process to happen
in the background, without the PC user seeing screens poping up for few
seconds and then disapearing.
Do you have any sugestions, any other workarounds?
THank you very much, in advance.
I ve searched enough newsgroups and internet sites, but didnt find any
reference to my problem.
i dont know if what im facing is specific to my installation, or a common
problem.
I'm trying to set reminders for apointments in the default calendar folder
of Outlook.
But i dont set them, as soon as i create the apointment. Instead, the
apointment is stored with no reminder at all, and later i open it and
process it, adding the reminder.
For this usage, i use the function "getitemfromid".
My code, is in Delphi, so for the majority of VB or VBA programers here, im
making some comments, although of course the object model is the same.
try
CoInitialize(nil); <----initialize com
objOL:=CoOutlookApplication.Create; <-----create the outlook aplication
ns:=objOL.GetNamespace('MAPI'); <-----get the namespace
myappf:=ns.GetDefaultFolder(olFolderCalendar); <-----get the default
calendar folder
objAppt:=ns.GetItemFromID(REminderID,myappf.StoreID) as AppointmentItem;
<-------------get the stored apointment item from the calendar folder
With objAppt do begin
//objAppt.Display(false); <---------this line is comented out (i dont
want the apoinment actually displayed) and unfortunately is the only
workaround i found so far, to my problem
ReminderMinutesBeforeStart:=(60 * 23) + 59; <--------set a reminder
time
ReminderSet:= True; <--------activate the item
objAppt.Save; <----save the reminder
//objAppt.Close(olSave); <-----------comented out as well
End;
finally
ns:=nil;
objOL:=nil;
objAppt:=nil;
couninitialize;
end;
i would like to ask, if some of you have faced the same situation:
If i set a reminder as soon as the apointment is created, everything seems
to be working fine.
If i create the apoitnment with no reminder, and then use my code, what
happens is this:
Everything seem to be stored perfectly ok, the reminder option is checked,
the time of the reminder is set as well, but no matter how long i wait for,
the reminder never comes up.
The only workaround for the reminder to come up, after editing the
apointment with GETITEMFROMID, is to display the item, change the properties
i need, save settings, and close the item.
But i dont want it to work this way, i would like all this process to happen
in the background, without the PC user seeing screens poping up for few
seconds and then disapearing.
Do you have any sugestions, any other workarounds?
THank you very much, in advance.