In VB the following code works:
Code: Select all
Set myOlApp = CreateObject("Outlook.Application")
Set olNameSpace = myOlApp.GetNamespace("MAPI")
Set myAppointments = olNameSpace.GetDefaultFolder(olFolderCalendar).Items
Find$ = "[Start] >= '" & tdystart & "'"
Set currentAppointment = myAppointments.Find(Find$)
Code: Select all
OutlookObject = COMate_CreateObject("Outlook.Application")
str_kommando$ = "GetNamespace(" + Chr(39) + "MAPI" + Chr(39) + ")"
ns = OutlookObject\GetObjectProperty(str_kommando$)
myfolder = ns\GetObjectProperty ("GetDefaultFolder(9)") ; olFolderCalendar
If Not myfolder
MessageRequester("Error", COMate_GetLastErrorDescription())
EndIf
items = myfolder\getObjectProperty("Items")
If Not items
MessageRequester("Error Automation Outlook", COMate_GetLastErrorDescription())
EndIf
DateToCheck$ = "Find([Start] >= '08/26/2011' AS DATE)"
item = items\GetObjectProperty(DateToCheck$)
If Not item
Debug COMate_GetLastErrorDescription()
EndIf
Debug item\getStringProperty("Subject")
The debug window show the following error:
"One or more arguments are invalid. Possibly a numerical overflow or too many nested objects, -if so, try splitting your method call into two or more subcalls."
What can I do?
best regards
Markus