killer
06-02-2017, 08:46 AM
I have some working code (thanks to code I found online and adapted and code from Graham Mayor on here) which saves attachments to a folder based on the subject line:-
so if the subject lines reads "BillBates" all the attachments are saved in a folder called "BillBates". This is all working fine. (The system is not allowing me to post this existing code)
I now need to enhance this:- if an attachment's name starts with the characters "F1" I want it's name to be changed, so it starts with "Face". For example, if the original filename is "F1-RH161FD.jpg" I want the attachment renamed to be ""Face-RH161FD.jpg". There will be several of these types of name change. (R1 = Rear" etc).
My gut feeling is that it would be better to FIRST run the VBA to rename the files, then run the one that saves the attachments to a folder.
I've found many examples of saving attachments with different names but not the scenario I require. Can anyone advise please?
TIA
Steve
so if the subject lines reads "BillBates" all the attachments are saved in a folder called "BillBates". This is all working fine. (The system is not allowing me to post this existing code)
I now need to enhance this:- if an attachment's name starts with the characters "F1" I want it's name to be changed, so it starts with "Face". For example, if the original filename is "F1-RH161FD.jpg" I want the attachment renamed to be ""Face-RH161FD.jpg". There will be several of these types of name change. (R1 = Rear" etc).
My gut feeling is that it would be better to FIRST run the VBA to rename the files, then run the one that saves the attachments to a folder.
I've found many examples of saving attachments with different names but not the scenario I require. Can anyone advise please?
TIA
Steve