Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to rename attachments in Outlook window without saving to disc?

For attachments of received email message, you may want to rename these attachments for easily recognizing in future work. Actually, there has no Outlook build-in function for you to directly rename attachments in Outlook window without saving them to disc. In this article, we will show you methods of renaming attachments in Outlook.

Automatically save and rename attachments with VBA code in Outlook

Easily rename attachments in email without saving to disc with Kutools for Outlook


Easily rename an attachment or all attachments in Outlook without saving to disc

Kutools for Outlook's Rename and Rename All utilities help you easily rename a specified attachment, or rename all attachments in an email without saving to disc in Outlook. see following screenshot:

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 45 days. Free Download Now

Office Tab - Enable Tabbed Editing and Browsing in Office, and Make Work Much Easier...
Kutools for Outlook - Brings 100 Powerful Advanced Features to Microsoft Outlook
  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by rules; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails at once; Auto Add Greeting when reply; Auto Add Date&Time into subject...
  • Attachment Tools: Auto Detach, Compress All, Rename All, Auto Save All... Quick Report, Count Selected Mails, Remove Duplicate Mails and Contacts...
  • More than 100 advanced features will solve most of your problems in Outlook 2010-2019 and 365. Full features 60-day free trial.

Save and rename attachments with VBA code in Outlook

In this section, we will provide you with a VBA code to automatically save the attachments of selected email and then add the last modified date before the file name after saving. Please do as follows.

1. Create a new folder which name is Attachments into the directory of Documents of your computer, and your renamed attachments will be saved in this folder.

2. Select the email with attachments you want to save and rename with modified date.

3. Press Alt + F11 keys simultaniously to open the Microsoft Visual Basic for Application window. In the Microsoft Visual Basic for Application window, click Insert > Module, and then copy and paste below VBA code into the Module window.

VBA code: Save attachments and add modified date before file name

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. Press the F5 key to run the code, and the attachments in selected email are saved to the folder "\Documents\Attachments\" and the last modified dates will be added before each attachment after saving.

Notes:

1. Also, this method do not really work to the selected attachment in Outlook window. If you want to directly rename attachments without saving, please do as below method shown.

2. This code will save and rename other objects such as images, charts, shapes and so on in the email body.


Easily rename attachments in email without saving to disc with Kutools for Outlook

You can rename attachments in Outlook window directly with the Rename attachments utility of Kutools for Outlook.

Kutools for Outlook : with more than 20 handy Outlook add-ins, free to try with no limitation in 45 days.

1. After installing Kutools for Outlook, please select an email with the attachments you want to rename, and then click to select an attachment in the Reading Pane to activate the Attachment Tools tab. See screenshot:

2. If you just want to rename the current selected attachment, please click Kutools > Rename. And in the Rename dialog box, change the attachment’s name in the Name box, and then click the OK button.

You can see the selected attachment is renamed immediately in Outlook window. See screenshot:

3. If you want to rename all attachments or multiple attachments in selected email, please click Kutools > Rename All. Then you can see all attachments in selected email are listed in the Attachments Rename dialog box. Please change the name to your need, and then click the OK button.

Note: Please keep the extensions (such as .docx) of the attachments’ name, removing them will change the file format.

If you want to have a free trial of this utility, please go to free download the software first, and then go to apply the operation according above steps.


Related articles:


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.