【问题标题】:How can you export a list of "Sent Items" in Outlook in a specific format?如何以特定格式导出 Outlook 中的“已发送邮件”列表?
【发布时间】:2011-01-24 17:44:23
【问题描述】:

我需要生成以下格式的已发送项目列表。

<sent to:> <Subject> <Date>

例子:

a@a.com "First Letter" 1/1/2011

b@b.com "Check out this second letter" 1/2/2011 

感谢任何帮助。看起来这家伙可以在这里通过 VBA 做到这一点 - http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_24483105.html

谢谢

【问题讨论】:

    标签: vba outlook reporting


    【解决方案1】:

    我目前无法测试,但这应该可以帮助您开始:

    Dim oApp As Outlook.Application
    Dim oNS As NameSpace
    Dim oSent As Outlook.MAPIFolder
    Dim strMessage As String
    Dim strAddresses As String
    Dim i, j
    
    Set oApp = CreateObject("Outlook.Application")
    Set oNS = oApp.GetNamespace("MAPI")
    Set oSent = oNS.GetDefaultFolder(olFolderSentMail)
    
    For i = 1 To oSent.Count
        For j = 1 To oSent(i).Recipients.Count
        ''http://msdn.microsoft.com/en-us/library/bb176763(v=office.12).aspx
            strAddresses = strAddresses & ";" _
            & oSent(i).Recipients(j).Address
        Next
        strMessage = strMessage _
        & Mid(strAddresses, 2) _
        & oSent(i).Subject _
        & oSent(i).SentOn & vbCrLf
    Next
    

    【讨论】:

      猜你喜欢
      • 2023-01-10
      • 1970-01-01
      • 1970-01-01
      • 2020-11-08
      • 1970-01-01
      • 2016-07-03
      • 1970-01-01
      • 2018-12-17
      • 1970-01-01
      相关资源
      最近更新 更多