如何在Outlook应用程序中将Outlook Mailitem设置为邮件

问题描述 投票:0回答:1

如果邮件不是它自己的窗口(即在Outlook中),则我无法弄清楚如何为正在编写的活动邮件设置MailItem变量。我见过several answers,它解释了如何将变量设置为这样的打开窗口:

Dim theEmail As MailItem, oInspector As Inspector
Set oInspector = Application.ActiveInspector
Set theEmail = oInspector.CurrentItem

这在消息草稿是新窗口的情况下非常有用。但是,如果草稿在Outlook中,则此方法现在可行。如何引用不是新窗口的有效草稿?

[我看过一些帖子都说Set theEmail = ActiveExplorer.Selection.Item(1),但这引用的是收到回复的邮件,而不是答复的草稿。

谢谢。

vba outlook
1个回答
0
投票

使用Explorer.ActiveInlineResponse。可以从Application.ActiveExplorer中检索资源管理器。

© www.soinside.com 2019 - 2024. All rights reserved.