使用 OLE 和 Delphi 列出给定日期的所有 Outlook 约会
我一直在尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几年前我不得不这样做,但发现这很令人沮丧。使用包含 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.
好吧,我通过谷歌找到了答案。
这里:
http://www.experts-exchange.com/编程/语言/Pascal/Delphi/Q_22095294.html
Ok, I found the answer google'ing.
Here:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22095294.html