Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for items in a MAPI-folder

Status
Not open for further replies.

Benedikt83

Programmer
Mar 21, 2003
5
DE
Hi a todos!

there occurs a problem when I try to insert Appointments in Outlook-Calendar:
I'd like to check wether they already exist

Outlook.Connect; //is a Wrapper-Component
NS := Outlook.GetNamespace('MAPI');
NS.Logon('', '', False, False);
Folder := NS.GetDefaultFolder(olFolderCalendar);
//...
Search := '[Subject] = "Schichtplan - Frühschicht" AND [Start] = #12/27/2003 6:00:00 am# AND [End] = #12/27/2003 2:00:00 pm#'; //string is fetched from DB, has always the same format
Items.ConnectTo(Folder.Items.Restrict(Search)); //Items is a wrapper-Component as well


Why is the Search-String after the call of Folder.Items.Find set to Zeros only:
Search = '(0, 0, 0, (0, 0, 0, 0, 0, 0, 0, 0))'; ?
A Error (EOleException) is raised, which says: Typeconflict or "0" illegal in condition)?

Thanx
Benedikt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top