VBA Extensibility in Outlook

可紊 提交于 2019-12-02 15:32:53

问题


I'd like to write a macro for Outlook 2007 that can add/remove modules in the VBA editor. The VBA Extensibility library looks perfect, but properties like Application.VBE seem to be inaccessible.

In Excel, I would need to enable "Trust access to the VBA project object model". Unfortunately, this option is missing in Outlook 2007.

Does anyone know of a way around this?

Thanks in advance!


回答1:


I worked around the limitations using SendKeys:

  • Alt-F11
  • Ctrl-M
  • Path to code module
  • Enter

Not elegant, but good enough.



来源:https://stackoverflow.com/questions/11355245/vba-extensibility-in-outlook

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