Outlook 宏可以触发其内置导入功能吗?
我正在尝试自动化 Outlook 以在启动时自动加载 iCalendar 文件 (.ics)。我已经知道需要使用哪些钩子来安排时间,我只是无法找到有关可能实现哪种自动化的高质量信息。
由于 Outlook 已经能够很好地导入 iCalendar 文件来满足我的目的,因此我更愿意触发该功能,而不是编写自己的解析代码。这可能吗?
I'm trying to automate Outlook to automatically load an iCalendar file (.ics) when it starts. I'm aware of the hooks I need to use to arrange the timing already, I just haven't been able to find quality information about what sort of automation is possible.
Since Outlook already has the ability to import iCalendar files well enough for my purposes, I'd prefer to trigger that functionality rather than write my own parsing code. Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
取决于你想要什么,答案是你做不到。
如果您想“导入”ics 文件,您无法单独完成,您需要例如兑换,请参阅此处 Visual Studio 论坛 因为 MS 经常移动链接,这里引用了那里的内容
那么你有什么选择或者你还能做什么。
首先,我假设您正在处理类似 application_startup 事件的事情。
您可以对文件进行“脱壳”——这与双击它具有相同的效果。
请参阅此处 带有示例的 MSDN shell 为此,您需要您的路径ics 文件。
但对于我来说,在你的立场上,我会首先尝试让生成 ics 文件的人或事物进行更改,或者我只是将其视为文本文件,解析信息(鉴于它是一个预期格式)并在 Outlook 中创建我自己的日历项目。
Depending on what you want, the answer is you cannot do it.
If you want to "import" the ics file you cannot do it alone, you would need for example redemption see here Visual Studio Forum Because MS moves their links often here is a quote from there
So what are you options or what else can you do.
First I assume you are working in something like the application_startup event.
you could "shell" the file - which would have the same effect as double clicking on it.
see here MSDN shell with examples For this you would need the path to your ics file.
But for me in your position, I would be first trying to get the person or thing generating the ics file to change OR I would be just treating it like a text file, parsing the information (which should not be too hard given it is an expected format) and creating my own calendar item in outlook.