Save attachments using hotkey without changing attributes

Status
Not open for further replies.

ofw62

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Current method:
open mail
select attachment(s)
save to
select folder
[OK]
close mail
next one ..

the date attributes of the files saved that in that way are updated to the date of saving (create/modified/access date)

Would there be a way to have these files saved
a. without having to open the mails on by one
b. preserve the original attributes, at least the creation date.

No doubt there are 3rd party tools (like EzDetach, payware) but I wonder whether there would be a native solution
or using a free script?

Office 365

I have noticed:
1. Article : Save and Rename Outlook Email Attachments with 3 scripts and many comments
first requiring
2. A registry patch outlined in Run-a-Script Rules Missing in Outlook

Now, after changing the registry, which script should I use?
I would like to have the name and then the created date added.
So, for example, file name reads: file-xyz.xlsx
the save as : file-xyz ddmmyyyy.xlsx (or file-xyz dd-mm-yyyy.xlsx)

Is this possible?

Thanks!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I would use the middle one - the run a script rule version. The first is manual, the last increments identical file names.

Adjusting the saved file name to meet your needs is generally easy enough
Code:
DateFormat = Format(Date, "yyyy-mm-dd ")

file = saveFolder & DateFormat & objAtt.DisplayName
Gives "date filename.ext" format. to do filename-date.ext format, you need to get the extension stick the date in before it.

you can use something like this from the first macro - it's actually better to get the position of the last dot then get the extension, unless you are only looking for specific file extensions.

Code:
For Each objAtt In itm.Attachments

' get the last 5 characters for the file extension
strExt = Right(objAtt.DisplayName, 4)

' clean the subject
strSubject = itm.Subject

ReplaceCharsForFileName strSubject, "-"
' put the name and extension together

file = saveFolder & strSubject & strExt
From another macro on the site - this would only save the ones that match the extensions.
Code:
' This code looks at the last 4 characters in a filename
      sFileType = LCase$(right$(objAtt.FileName, 4))

      Select Case sFileType

' Add additional file types below
      Case ".xls", ".doc", "docx"
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
S using script rule to save attachments on arrival Outlook 2010 Outlook VBA and Custom Forms 9
R Use an ItemAdd to Save Attachments on Arrival Outlook VBA and Custom Forms 0
W Save and rename outlook email attachments to include domain name & date received Outlook VBA and Custom Forms 4
J Save E-mail attachments in a specific folder Outlook VBA and Custom Forms 0
C Auto save outlook attachments when email is received Outlook VBA and Custom Forms 1
Diane Poremsky Save Messages and Attachments to a New Folder New Slipstick.com Articles 0
B Delete/replace old files and save new attachments Using Outlook 1
Diane Poremsky Edit and Save Outlook's Read-Only Attachments New Slipstick.com Articles 0
Diane Poremsky Save Attachments to the Hard Drive New Slipstick.com Articles 2
C Rule To Save attachments on receipt of email Outlook VBA and Custom Forms 2
B Auto Save of Attachments from Multiple Emails and forward attachments to user group Outlook VBA and Custom Forms 1
Diane Poremsky Save Messages and Attachments to a New Folder New Slipstick.com Articles 0
R Outlook 2013 VB rule to auto save attachments with different file types Outlook VBA and Custom Forms 5
C Save outlook attachments and rename/append files with identifier from subject line Outlook VBA and Custom Forms 3
M VBA code to save email attachments (PDF) as email subject line Outlook VBA and Custom Forms 1
D Save pst and attachments as a PDF File Outlook VBA and Custom Forms 3
E Outlook prompts to save attachments when no changes have been made. Using Outlook 0
M Save Attachments Event? Using Outlook 0
A File - Save Attachments does nothing in Outlook 2003 with Exchange 2010 ... Using Outlook 3
R VB code to bulk save attachments deletes message Using Outlook 1
O closing outlook prompts to save all opened attachments Using Outlook 2
M Outlook 2007 - Save outgoing attachments to network drive on sending? Using Outlook 1
T "Save All Attachments" not working with Exchange 2010 Exchange Server Administration 3
M when I save my messages it saves images as attachments . how can I stop it ? Using Outlook 16
M Need something to automatically save attachments to a hard drive Using Outlook 3
M Remove download or save target as option with attachments in OWA 2007 Using Outlook 3
C Linking e-mail messages to Business Contact Manager records does not save the attachments in the ema Using Outlook 1
C Email attachments will not open in outlook nor will they open if I save and try to open. They are sh Using Outlook 1
D Changing the default "save to" for attachments in Outlook 2010 Using Outlook 7
F Exchange 2010 rollup 3 and Outlook 2007 sp2 Can't save attachments Exchange Server Administration 14
J Outlook 2007: Save All attachments Exchange Server Administration 34
S how to disable security message in save attachments macro "A programis trying to access e-mail addre Outlook VBA and Custom Forms 5
U Save messages and attachments for a date range Outlook VBA and Custom Forms 2
M save attachments code? Outlook VBA and Custom Forms 1
D Prevent popup of "Do you want to save changes?" when closing after opening an appointment to view Outlook VBA and Custom Forms 2
A Unable to save recurring Meeting to Documents folder due to error Using Outlook 2
M Outlook 2013 Script Assistance - Save Opened Link with Subject Added Outlook VBA and Custom Forms 1
W Outlook Calendar does not save view any longer! Using Outlook 3
S automate save the .xlxs file to share Network Using Outlook 1
S save email from excel Outlook VBA and Custom Forms 1
Y Open and Save Hyperlink Files in multiple emails Outlook VBA and Custom Forms 9
9 Outlook 2016 How to save an Outlook attachment to a specific folder then delete the email it came from? Using Outlook 1
geofferyh Cannot get Macro to SAVE more than one message attachment??? Outlook VBA and Custom Forms 5
N Open & Save VBAProject.Otm using VBA Code Outlook VBA and Custom Forms 1
R VBA | Chosing path to save file Outlook VBA and Custom Forms 1
V Change default default save location to Quick Access Using Outlook 1
W Save Outlook attachment in network folder and rename to current date and time Outlook VBA and Custom Forms 18
C Change default "Save Sent Item To" folder Outlook VBA and Custom Forms 9
C Outlook - cannot save subject line changes Using Outlook 2
I Outlook 2016 64bit - on receipt convert emails into PDF and save Outlook VBA and Custom Forms 2
Similar threads


















































Top