views:

213

answers:

2

I've been trying to list the appointments for a given date (say today) on a tmemo by using OLE under delphi. It's been unsuccessful so far. The basic code starts with

  try
    Outlook := GetActiveOleObject('outlook.application');
  except
    Outlook := CreateOleObject('outlook.application');
  end;

  Namespace := Outlook.GetNamespace('MAPI');
  Calendar := Namespace.GetDefaultFolder(olFolderCalendar);  // or use $000009

from there I tried to access Calendar.Items but I get different results each time and I don't see the recurring appointments even when I set the option to true.

Is there any way to list the appointments for a given date using Delphi 7? Code is appreciated.

Thanks

+1  A: 

I had to do this a few years ago, and found it frustrating. It was much easier to use a library that wrapped all the nuances of Outlook. I strongly recommend EasyMAPI from RapWare.

Edit: Not tested, but I did find some sample code (if you scroll to the very bottom, you can see the text of the responses) that the author claims works. This could serve as a starting point.

Bruce McGee
thanks but for what I need a full library is an overkill. Thank though for the info
Uri
+1  A: 

Ok, I found the answer google'ing.

Here:

http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22095294.html

Uri