开发者

Listing all Outlook appointments for a given date using OLE and Delphi

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 diffe开发者_开发问答rent 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


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.


Ok, I found the answer google'ing.

Here:

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜