使用当前电子邮件,无需编辑/回复/转发

时间:2019-05-17 13:36:38

标签: vba outlook

我正在尝试根据一封电子邮件撰写一封电子邮件,该电子邮件当前已在我的收件箱中打开。我在this URL下找到了一些来源,但是由于oInspectorNothing,所以整个工作都无法正常工作(实际上,oInspector似乎仅在转发时被填充并弹出电子邮件)。

这里是我所指的源代码:

    Dim myText As String
    myText = "Hello world"

    Dim NewMail As MailItem, oInspector As Inspector
    Set oInspector = Application.ActiveInspector
    If oInspector Is Nothing Then   ' <== indeed, this seems to be Nothing
        MsgBox "No active inspector"
    Else
        Set NewMail = oInspector.CurrentItem
        If NewMail.Sent Then
            MsgBox "This is not an editable email"
        Else
            If oInspector.IsWordMail Then

0 个答案:

没有答案