安排 Outlook 2003 宏 [英] Schedule Outlook 2003 Macro

查看:18
本文介绍了安排 Outlook 2003 宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用 VBA 编写的 Outlook 2003 宏.

I have an Outlook 2003 macro written in VBA.

我想安排它,让它在某个时间自动运行,比如 01:00.PC 始终处于登录状态.

I would like to schedule it so that it automatically runs at a certain time, say 01:00. The PC is always logged on.

我找不到任何建议如何执行此操作的内容.

I couldn't find anything which suggests how to do this.

推荐答案

您可以在 PC 上创建一个计划任务在特定时间每天运行,并使用 Outlook 命令行开关启动程序并调用您的宏 eg:

You could create a scheduled task on the PC to run daily at the specific time, and use the Outlook Command Line Switch to start the program and call your macro e.g:

"C:Program FilesMicrosoft OfficeOffice11Outlook.exe" /autorun macroname

更新:

您可以使用 API 调用来启动计时器以在 Outlook 后台运行,您可以将此与 VB Now() 命令结合使用以获取当前时间,如果大于您的调度时间,则可以触发您的宏,可以在此处找到 API 示例:

You may be able to use an API call to start a timer to run in the background of outlook, you could combine this with the VB Now() command to get the current time and if greater than your scheduling time you could trigger your macro, the API example can be found here:

http://www.outlookcode.com/threads.aspx?forumid=4&messageid=22831

这篇关于安排 Outlook 2003 宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆