koltregaskes
New Member
- Joined
- Feb 8, 2005
- Messages
- 15
We received about 15 reports from various sources each day to our reporting mailbox. I have created Outlook VBA scripts, which are run from a message rule, to save each report from the emails to the relevant network folder (for different projects). I have a few questions on extracting and renaming the attachments:
1. How can I extract a file from an attachment with VBA to a specific folder? Example name is "report_20170831070501.zip"
2. How can I rename the file to remove the last 2 characters? Example name is report_20170831070501.csv - so would like to remove the "01", as in the seconds.
3. How can I rename the file of another report to remove the timestamp at the end of the name but keep the datestamp? Timestamp in hh-mm-ss formate, example name of report is "This Report_2017-08-31-05-41-56.xlsx".
If you need any further info from me, just shout.
Ta.
1. How can I extract a file from an attachment with VBA to a specific folder? Example name is "report_20170831070501.zip"
2. How can I rename the file to remove the last 2 characters? Example name is report_20170831070501.csv - so would like to remove the "01", as in the seconds.
3. How can I rename the file of another report to remove the timestamp at the end of the name but keep the datestamp? Timestamp in hh-mm-ss formate, example name of report is "This Report_2017-08-31-05-41-56.xlsx".
If you need any further info from me, just shout.
Ta.