小编Bra*_*x43的帖子

Outlook VBA Mailitem 属性 SenderEmailAddress 未正确返回地址

所以我有一个程序可以让用户选择一个 Outlook 文件夹来导入到表中。然后可以从组合框中选择并传输到表单以供使用。

但是,我对返回的值之一有问题。SenderEmailAddress 实际上并没有给我一个电子邮件地址,例如这是我保存在我的表中的内容。

为了隐私,我删除了名字。

/O=COMPANY/OU=MAIL12/CN=RECIPIENTS/CN=FIRSTNAME.LASTNAME

现在当然,如果我想将此值传递回 Outlook 以回复电子邮件,我不能使用它。

有人可以帮我吗?

Public Sub LoadEmails()

    On Error Resume Next

    'Outlook wasn't running, start it from code
    If Started = False Then
        Set olApp = New Outlook.Application '("Outlook.Application")
        Started = True
    End If

    Set myNamespace = olApp.GetNamespace("MAPI")
    Set objFolder = myNamespace.PickFolder

    ' if outlook is closed, it will display this error
    If Err <> 0 Then
        MsgBox "Outlook was closed. Please log out and log back in."
        Started = False
        Exit Sub …
Run Code Online (Sandbox Code Playgroud)

email ms-access outlook vba

2
推荐指数
1
解决办法
2565
查看次数

标签 统计

email ×1

ms-access ×1

outlook ×1

vba ×1