The following code works on Windows 95 but gives this error on XP - OLE IDispatch exception code 4096 from Microsoft Outlook
The line that fails is shown in capitals.
Can any of you help?
objOutlook = createobject ('Outlook.Application')
objNamespace = objOutlook.GetNamespace('MAPI')
*Attempt to get Outlook Actions where [mileage] contains client and matter number
*set up the search clause for example "[mileage] = '1-202'"
myclause="[mileage] = '"+alltrim(curcli)+"-"+alltrim(curmat)+"'"
LOITEM=NUMITEMS.FIND(MYCLAUSE)
do while isnull(loitem)=.F.
x=x+1
Myitem=loitem
* Myitem.display
outlst(x,1)=Myitem.billinginformation
outlst(x,2)=Myitem.subject
outlst(x,3)=Myitem.start
outlst(x,4)='None'
outlst(x,5)=Myitem.body
if Myitem.alldayevent=.t. Then
outlst(x,6)='Event'
else
outlst(x,6)='Appointment'
endif
loitem=numitems.findnext
enddo
The line that fails is shown in capitals.
Can any of you help?
objOutlook = createobject ('Outlook.Application')
objNamespace = objOutlook.GetNamespace('MAPI')
*Attempt to get Outlook Actions where [mileage] contains client and matter number
*set up the search clause for example "[mileage] = '1-202'"
myclause="[mileage] = '"+alltrim(curcli)+"-"+alltrim(curmat)+"'"
LOITEM=NUMITEMS.FIND(MYCLAUSE)
do while isnull(loitem)=.F.
x=x+1
Myitem=loitem
* Myitem.display
outlst(x,1)=Myitem.billinginformation
outlst(x,2)=Myitem.subject
outlst(x,3)=Myitem.start
outlst(x,4)='None'
outlst(x,5)=Myitem.body
if Myitem.alldayevent=.t. Then
outlst(x,6)='Event'
else
outlst(x,6)='Appointment'
endif
loitem=numitems.findnext
enddo