使用 Excel VBA 打开 Outlook 宏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6910865/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 13:44:48  来源:igfitidea点击:

Open Outlook Macro With Excel VBA?

excelvbaexcel-vbaoutlookoutlook-vba

提问by MrPropper

Possible Duplicate:
Call outlook VBA from Excel

可能重复:
从 Excel 调用 Outlook VBA

I know about the Application.Runmethod from Excel, with which I can open an Excel macro from Outlook.

我知道Application.RunExcel 中的方法,我可以用它从 Outlook 中打开 Excel 宏。

I need to switch the Excel.Applicationobject to Outlook.Applicationand it doesn't work.

我需要将Excel.Application对象切换到Outlook.Application它,但它不起作用。

The error message is: "Method is not supported."

错误信息是: "Method is not supported."

回答by JMax

According to this thread, the only way to do this is to call a procedure stored in ThisOutlookSession:

根据此线程,执行此操作的唯一方法是调用存储在ThisOutlookSession以下位置的过程:

Set myOlApp = CreateObject("Outlook.Application")
myOlApp.MyProcedure

However, this seems unsupported by MS.

但是,这似乎不受 MS 支持。