Hello, I am trying to save email attachments from outlook into a particular folder based on the email subject name. I want to save all attachments from last week only. I just want to save email attachments with the same subject into one folder.
Breakdown
Loop through each email
1. Get email subjects
2. Use email subjects to create a folder
3. For each of the emails received in the previous week,
If the email subject is equal to an already created folder name(with the same subject), save attachments
Else create a new folder based on the subject name to save attachments.
The issues I'm facing are;
1. Some of the email subjects have characters that can't be used in naming folders.
2. I am not able to check emails from the current date till 7 days before.
Could anyone please help? @v-yamao-msft @AlanPs1 @KvB1 @v-yuazh-msft
Thank you in advance.