使用 OLE 和 Delphi 列出给定日期的所有 Outlook 约会

发布于 2024-08-20 01:19:14 字数 486 浏览 4 评论 0原文

我一直在尝试使用 delphi 下的 OLE 在 tmemo 上列出给定日期(比如今天)的约会。到目前为止还没有成功。 基本代码

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

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

从那里开始,我尝试访问 Calendar.Items 但每次都会得到不同的结果,即使我将选项设置为 true,我也看不到定期约会。

有没有办法使用 Delphi 7 列出给定日期的约会? 代码受到赞赏。

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

触ぅ动初心 2024-08-27 01:19:14

几年前我不得不这样做,但发现这很令人沮丧。使用包含 Outlook 所有细微差别的库要容易得多。我强烈推荐来自 EasyMAPI。 rapware.nl" rel="nofollow noreferrer">RapWare。

编辑:
未经测试,但我确实找到了一些示例代码 (如果滚动到最底部,您可以看到回复的文本)作者声称有效。这可以作为一个起点。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文