首页 > 解决方案 > 如何更改与 Outlook Mailitem 关联的 Inspector.EditorType?

问题描述

在我的代码中,我首先使用 Word Inspector 显示和编辑 Outlook Mailitem:

Dim oMail As Outlook.MailItem
Set oMail = OutlApp.CreateItemFromTemplate(TemplatePath & TemplateName)

oMail.Display

Dim WordDoc As Word.Document
Set WordDoc = oMail.GetInspector.WordEditor

然后我正在使用 WordDoc 进行一些操作,例如在表格中添加条目等。在此之后,我想关闭 WordEditor 并在普通 Outlook.Inspector 中打开项目

当然oMail.GetInspector.EditorType = olEditorHTML不起作用,因为 EditorType 是只读属性。但是,但是我尝试显示 Mail,EditorTypestays olEditorWord,并且我看不到更改它的简单方法。

是否可以将EditorType关联更改为Outlook.Mailitem不保存并重新打开它?

标签: vbaoutlookms-office

解决方案


推荐阅读