Start Outlook Command Line Switches Parameters And Launch Macro

隐身守侯 提交于 2021-01-29 04:27:42

问题


I'd like to open outlook via command with parameters and launch macro once is opened...

this code open outlook with parameters

outlook.exe /c ipm.note /m "m@m.m&subject=abc&body=123" /a "f:\attach.txt"

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 "m@m.m,&subject=abc&body=123" /a "f:\attach.txt" /autorun mymacro

回答1:


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?



来源:https://stackoverflow.com/questions/34038609/start-outlook-command-line-switches-parameters-and-launch-macro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!