问题描述
我想通过带有参数的命令打开Outlook,一旦打开启动宏...
I'd like to open outlook via command with parameters and launch macro once is opened...
此代码使用参数打开Outlook
this code open outlook with parameters
outlook.exe /c ipm.note /m "[email protected]&subject=abc&body=123" /a "f:\attach.txt"
如果我添加代码以启动宏,Outlook将无法打开并给我一个错误...这段代码有什么问题?
if I add code to launch a macro, outlook won't open and give me an error...what's wrong in this code ?
outlook.exe /c ipm.note /m "[email protected],&subject=abc&body=123" /a "f:\attach.txt" /autorun mymacro
推荐答案
您不能使用命令行开关运行宏.唯一相关的命令是/altvba,但这是用于加载备用VBA项目文件的命令.如果您的意图是也没有选择将数据作为要由宏读取的值进行传递.也许外接程序最适合您的解决方案?
You can't run a macro using a command-line switch. The only relevant command is /altvba, but that's for loading an alternate VBA project file. There's also no option to pass data as a value to be read by a macro if that's your intent. Perhaps an add-in would be best for your solution?
这篇关于启动Outlook命令行开关参数并启动宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!