如何导出“已发送邮件”列表在 Outlook 中以特定格式显示?

发布于 2024-10-14 11:21:02 字数 715 浏览 0 评论 0原文

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

<sent to:> <Subject> <Date>

示例:

[email protected] "First Letter" 1/1/2011

[email protected] "Check out this second letter" 1/2/2011 

如有任何帮助,我们将不胜感激。看起来这个人可以通过 VBA 来完成此操作 - http:// www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_24483105.html

谢谢

I need to generate a list of Sent Items in the following format.

<sent to:> <Subject> <Date>

Example:

[email protected] "First Letter" 1/1/2011

[email protected] "Check out this second letter" 1/2/2011 

Any help is appreciated. Looks like this guy can do it via VBA here - http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_24483105.html

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅冕 2024-10-21 11:21:02

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

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

I cannot test at the moment, but this should get you started:

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文