跳到主要内容

如何在Outlook窗口中重命名附件而不保存到光盘?

对于收到的电子邮件的附件,您可能需要重命名这些附件,以便在以后的工作中轻松识别。 实际上,没有Outlook内置功能可让您直接在Outlook窗口中重命名附件而不将其保存到光盘中。 在本文中,我们将向您展示在Outlook中重命名附件的方法。

在Outlook中使用VBA代码自动保存和重命名附件
使用 Kutools for Outlook 轻松重命名电子邮件中的附件,无需保存到光盘


在Outlook中使用VBA代码保存和重命名附件

在本节中,我们将提供VBA代码以自动保存所选电子邮件的附件。 保存后,您可以看到附件的最后修改日期已添加为原始附件名称的前缀。 请执行以下操作。

1.在 文件 文件夹,创建一个名为 附件 保存并重命名所选电子邮件的附件。

2.选择带有您要保存的附件的电子邮件,然后使用修改后的日期重命名。

3。 按 其他 + F11 同时打开钥匙 Microsoft Visual Basic应用程序 窗口。 在里面 Microsoft Visual Basic应用程序 窗口中,单击 插页 > 模块,然后将以下VBA代码粘贴到“模块”窗口中。

VBA代码:保存附件并在文件名之前添加修改的日期

Public Sub saveattachmentsadddate()
	Dim itm As Outlook.MailItem
	Dim currentExplorer As Explorer
	Dim Selection As Selection
	Dim objAtt As Outlook.Attachment
	Dim saveFolder As String
	Dim fso As Object
	Dim oldName
	Dim file As String
	Dim DateFormat As String
	Dim newName As String
	Dim enviro As String
	enviro              = CStr(Environ("USERPROFILE"))
	saveFolder          = enviro & "\Documents\Attachments\"
	Set currentExplorer = Application.ActiveExplorer
	Set Selection       = currentExplorer.Selection
	Set fso             = CreateObject("Scripting.FileSystemObject")
	On Error Resume Next
	For Each itm In Selection
		For Each objAtt In itm.Attachments
			file = saveFolder & objAtt.DisplayName
			objAtt.SaveAsFile file
			'Get the file name
			Set oldName  = fso.GetFile(file)
			DateFormat   = Format(oldName.DateLastModified, "yyyy-mm-dd ")
			newName      = DateFormat & objAtt.DisplayName
			oldName.Name = newName
			Set objAtt   = Nothing
		Next
	Next
	Set fso = Nothing
End Sub

4。 按 F5 键运行代码,并将所选电子邮件中的附件保存到该文件夹 “ \ Documents \ Attachments \” 附件的最后修改日期会自动添加为原始附件名称的前缀。

:

1.如果要重命名所选电子邮件中的任何一个附件而不是全部重命名,则此方法无效。
2.此代码还将在电子邮件正文中保存并重命名其他对象,例如图像,图表,形状等。

使用 Kutools for Outlook 轻松重命名电子邮件中的附件,无需保存到光盘

这里强烈推荐 重命名附件 的特点 Kutools for Outlook。 使用此功能,您可以直接在Outlook窗口中重命名附件,而无需保存到光盘。

Kutools for Outlook :具有100多个方便的Outlook加载项, 60天免费试用.

1.安装后 Kutools for Outlook,请选择要重命名附件的电子邮件,然后单击 库工具 > 附件工具 > 重命名全部.

2.在 附件重命名 对话框中,您可以看到所选电子邮件的所有附件名称都列在 名字 柱。 请双击附件名称进行编辑,然后单击 OK 按钮保存更改。
Tips:您可以修改所有附件名称,也可以根据需要在对话框中仅修改任何附件名称。

然后在选定的电子邮件窗口中重命名附件。 

备注:您可以通过在阅读窗格中选择某个附件,然后单击它来重命名该附件 库工具 > 重命名,在重命名对话框中,在 名字 框,然后单击 OK 按钮进行保存。 看截图:

如果您想免费试用该实用程序,请转到 免费下载软件 首先,然后按照上述步骤进行操作。


相关文章:


最佳办公生产力工具

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

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

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

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

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

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

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

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

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

了解更多       免费下载      购买
 

 

Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Well, that didn't work. Thanks for nothing.
This comment was minimized by the moderator on the site
Dear Mike,
Any problem with the method, please don't hesitate to let me know. Thank you for your comment.
This comment was minimized by the moderator on the site
I can only echo previous comments: I would like to be able to re-name the file when I forward it. I wouldn't want to re-name the original that I received from a client. I need to be able to re-name when I'm passing on files internally and they need to comply with internal naming conventions. It's a shame that this is not available.
This comment was minimized by the moderator on the site
Dear SG,
The suggestion was adopted. We are trying to enhance the function to be more useful. We really appreciate your advice.
This comment was minimized by the moderator on the site
I think it is essential that you can re-name files in message that you want to forward. I need to keep the original name of a file in the original e-mail, but re-name to comply with internal naming conventions before I pass it on internally. So, I need to be able to see both entries.
This comment was minimized by the moderator on the site
Nice tool with the Kutools add on. There is a condition I think is confusing people. You can't rename it in the message if you pop the message out of the main Outlook Window. You have to be in the main Outlook interface, highlight the attachment, then the ATTACHMENT TOOLS tab turns on. There, appears a second KUTOOLS tab with the rename option in the original email.
This comment was minimized by the moderator on the site
Nice tool with Kutools! I find that the rename option is available on the original email only if you haven't popped the email out of the Outlook Interface. The Attachment Tools tab is highlighted and you have to switch to the Kutools tab under the Attachment Tools tab. I think that is where people are getting confused.
This comment was minimized by the moderator on the site
Nice software, but it sucks that you can only change the name of the file AFTER an email has been sent. That defeats the purpose. Want to change the name when creating a new email just after having attached the file BEFORE sending out.
This comment was minimized by the moderator on the site
yes, want to change name before send out, the feature is very important to us.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations