跳到主要内容

在Outlook中阅读后如何将电子邮件移动到指定的文件夹?

阅读后将电子邮件移动到指定的文件夹是保持Outlook中收件箱文件夹干净的最佳方法。 对于许多Outlook用户,他们倾向于为这些已读电子邮件的移动创建规则。 实际上,Outlook不支持此规则向导过程。 在本文中,我们将向您展示在Outlook中使用VBA代码阅读后如何将电子邮件移动到指定的文件夹。

在Outlook中阅读后将电子邮件移动到指定的文件夹

Office 选项卡 - 在 Microsoft Office 中启用选项卡式编辑和浏览,让工作变得轻而易举
Kutools for Outlook - 通过 100 多个高级功能增强 Outlook,实现卓越效率
使用这些高级功能增强您的 Outlook 2021 - 2010 或 Outlook 365。 享受全面的 60 天免费试用并提升您的电子邮件体验!

箭头蓝色右气泡在Outlook中阅读后将电子邮件移动到指定的文件夹

在Outlook中运行VBA代码阅读后,可以将电子邮件移动到指定的文件夹。

1.首先,您需要创建一个新的文件夹名称“评论”位于“收件箱”文件夹下。

2.打开收件箱文件夹,然后按 其他 + F11 键打开 Microsoft Visual Basic应用程序 窗口。

3.然后双击以展开 Project1 > Microsoft Outlook对象 > 本次展望会议 打开 Vba工程.OTM 编辑。

4.然后将下面的VBA代码复制并粘贴到VbaProject.OTM编辑器,如上面的屏幕快照所示。

VBA代码:阅读后移动消息

Sub MoveInbox2Reviewed()
On Error Resume Next
Set oOutlook = CreateObject("Outlook.Application")
Set oNamespace = oOutlook.GetNamespace("MAPI")
Set oFolderSrc = oNamespace.GetDefaultFolder(olFolderInbox)
Set oFolderDst = oFolderSrc.Folders("Reviewed")
Set oFilteredItems = oFolderSrc.Items.Restrict("[UnRead] = False")
For Each oMessage In oFilteredItems
    oMessage.Move oFolderDst
Next
End Sub 

5.然后点击 保存 按钮以保存VBA代码,然后关闭 Microsoft Visual Basic应用程序 窗口。

6.右键单击 快速访问工具栏,然后选择 自定义快速访问工具栏 从右键单击菜单中。 看截图:

7.在 Outlook选项 对话框,您需要:

1)。 选择 ,在 从中选择命令 下拉列表;

2)。 选择 专案1。 ThisOutlookSession 在下面的框中 从中选择命令 下拉列表;

3)。 点击 地址 按钮;

4)。 点击 OK 按钮。

8.然后您可以看到 按钮显示在 快速访问工具栏。 确保您位于要移动所有已读邮件的收件箱文件夹中,然后单击 按钮可在收件箱中运行VBA代码。

:

1.此VBA代码可以在Outlook 2007、2010和2013中应用; 但是,在Outlook 2007中,您可以直接单击 运行 按钮运行代码。

2.如果您的Outlook中存在多个电子邮件帐户,则VBA代码只能应用于将数据文件设置为默认帐户的帐户。 您可以通过单击来检查默认数据文件 文件 > 资料包 > 帐户设置 > 帐户设置 打开 帐户设置 对话框。 然后去 资料档案 标签,您将看到默认数据文件标记为 过。

3.如果要将默认数据文件更改为另一个电子邮件帐户,请选择并突出显示要设置为默认帐户的帐户,然后单击 设为默认 ,在 帐户设置 对话框。

4.第一次运行VBA代码时,如果发现一次读取的消息没有全部移出,请继续单击“宏”按钮,直到收件箱中的所有读取的消息都移出。


最佳办公生产力工具

Kutools for Outlook - 超过 100 种强大功能可增强您的 Outlook

🤖 人工智能邮件助手: 具有人工智能魔力的即时专业电子邮件——一键天才回复、完美语气、多语言掌握。轻松改变电子邮件! ...

📧 电子邮件自动化: 外出(适用于 POP 和 IMAP)  /  安排发送电子邮件  /  发送电子邮件时按规则自动抄送/密件抄送  /  自动转发(高级规则)   /  自动添加问候语   /  自动将多收件人电子邮件拆分为单独的消息 ...

📨 电子邮件管理: 轻松回忆电子邮件  /  按主题和其他人阻止诈骗电子邮件  /  删除重复的电子邮件  /  高级搜索  /  合并文件夹 ...

📁 附件专业版批量保存  /  批量分离  /  批量压缩  /  自动保存   /  自动分离  /  自动压缩 ...

🌟 界面魔法: 😊更多又漂亮又酷的表情符号   /  使用选项卡式视图提高 Outlook 工作效率  /  最小化 Outlook 而不是关闭 ...

👍 一键奇迹: 使用传入附件回复全部  /   反网络钓鱼电子邮件  /  🕘显示发件人的时区 ...

👩🏼‍🤝‍👩🏻 通讯录和日历: 从选定的电子邮件中批量添加联系人  /  将联系人组拆分为各个组  /  删除生日提醒 ...

超过 100特点 等待您的探索! 单击此处了解更多。

了解更多       免费下载      购买
 

 

 

Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
What if Only want to move read messages not from the main Inbox but from an Inbox sub-folder to the "Reviewed" folder?
This comment was minimized by the moderator on the site
What if Only want to move read messages not from the main Inbox but from an Inbox sub-folder to the "Reviewed" folder?
This comment was minimized by the moderator on the site
I used this VBA code, but now all of the emails moved to "Reviewed" are gone? Any ideas why?
This comment was minimized by the moderator on the site
has anyone had this not work the second time you tried to apply it?
This comment was minimized by the moderator on the site
Buongiorno


Esiste la versione per Outlook 365 in italiano (non so se cambia qualcosa). Grazie
This comment was minimized by the moderator on the site
What line do I add when I only want this rule to apply to emails with a subject line including a word or text?
This comment was minimized by the moderator on the site
Where's all the Dim's?????????????????????/ o.0
This comment was minimized by the moderator on the site
I tried the above method but nothing happens. I verified the folder name was accurate and in the right location. I also set my main account as default, where i will be moving read messages from. I click on the Macro button...nothing. Help. Did I miss something.
This comment was minimized by the moderator on the site
You have to activate the references in VBA
This comment was minimized by the moderator on the site
Can this VBA code be altered to move messages from an Inbox subfolder to a "Reviewed" folder in said subfolder?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations