using outlook com-handle

Posted by LegacyUser on 12-Nov-2000 12:52

I Want to know if there is way to update the outlook calender using progress com-handle

object

All Replies

Posted by LegacyUser on 10-Jan-2001 08:51

"nirsho" wrote:

>>I Want to know if there is way to update the outlook calender

>using progress com-handle>object

Sure:

DEFINE VARIABLE outlook AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE olNameSpace AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE olAppointmentItem as int init 1.

DEFINE VARIABLE CalElement AS COM-HANDLE NO-UNDO.

DEFINE VARIABLE datkons AS INTEGER INITIAL 35431 NO-UNDO. /* = 1.1.1997 */

CREATE "outlook.Application":u outlook connect no-error.

if ERROR-STATUS:error then CREATE "outlook.Application":u outlook.

olNameSpace=outlook:GetNameSpace("MAPI":u).

CalElement = outlook:createItem(olAppointmentItem).

CalElement:start = datkons + (aktion.aktion-datum - datkons2) + (aktion.aktion-zeit / 86400).

CalElement:end = datkons + (aktion.aktion-datum - datkons2) + (aktion.aktion-zeit / 86400).

CalElement:Importance = aktion.prioritat.

CalElement:ReminderSet = false.

no-return-value CalElement:save.

centryid = CalElement:entryid.

Hope that helps a bit. This is just copied and pasted from my App. So it's possible that some

things are missing. But It should give a hint how it works.

Fun

Patrick

This thread is closed