Thanks for your help until now.
As you asked me to, I'll continue our conversation here.
After your advice of last Wednesday, I tried this code today :
Code: Select all
oOutlook := CreateObject("Outlook.Application")
oNameSpace := oOutlook:GetNameSpace("MAPI")
oCalendar := oNameSpace:GetDefaultFolder(outlookFolderCalendar)
oItem := oOutlook:CreateItem(1)
oItem:Start := DTOC(AG->AGDATUM) + " " + AG->AGBTIJD
oItem:StartTime := AG->AGBTIJD + ":00"
oItem:Duration := Ol1Minuut * 60
oItem:Subject := ALLTRIM(IF(VAL(AG->AGSRTNR)=0,AG->AGSRTNRN,AG->AGOMSCH))
oItem:Body := ALLTRIM(cOUTLOMSCH)
oItem:Category := IF(VAL(AG->AGSRTNR)<=0,"Rechtbank",AG->AGSRTNRN)
oItem:Location := ALLTRIM(AG->AGVERGNRN)
oItem:Importance := ExPrior
IF AG->ALARM
oItem:ReminderMinutesBeforeStart := cOl2Minuut * 60
oItem:ReminderSet := cTRUE
ELSE
oItem:ReminderSet := cFALSE
ENDIF
oItem:Save()
oCalendar := NIL
oNameSpace := NIL
oOutlook := NIL
oItem := NIL
On line 3 I already get a GPF and my application is closed.
What now ?
Thanks a lot.
Regards.