Forum Discussion
Rules & VBA For Saving Many Attachments
Hello, I am looking for some advice on the most efficient way to save many attachments in outlook.
So I am on Windows 11 and my version of Outlook is 2010.
I am AP for my company & my invoices are sent to me via pdf attachments in my emails. I used to be able to use Rules & VBA script to save & organize my incoming invoices. Since I get so many, it saved me a lot of time. Here is an example of what I would do: I would create a rule that said to look for emails from a particular company, that had an attachment, and I would run a script that saved that attachment to a particular folder in My Documents, then move the email to an outlook folder.
When the update happened a few years back, the "run a script" feature was removed from Rules as an option. I am not fluent with VBA but I knew enough to get help from a forum like this to add the developer to the Outlook ribbon and I went into the Trust center under options to enable macros. I found a VBA that will let me select many emails, run that script and all the attachments within those emails are saved to a folder in My Documents.
What I'm looking for now is....how can I utilize Rules or VBA to save attachments from a particular email address to a particular folder? Right now, I can save many attachments all at once, but then I still have to open them and move them to their proper folders. I dont know enough about code to figure this out. If its even possible. I get maybe 100 invoices a day on average from a few hundred companies. I dont need a folder for each company; I just want to sort them alphabetically. I have a folder for companies starting with the letter A, then B....etc.
any ideas? i thought about sorting my emails, but their senders addresses are not consistent enough to do that, they appear so different. I would be grateful for any help. I've thought about asking to be able to buy some sort of software or upgrade for this, but they're not gonna let me spend money on it. anyway, thanks in advance.
- Did the script you used before do exactly what you needed? You can still use run a script but need a registry key set -
https://www.slipstick.com/outlook/rules/outlook-run-a-script-rules/
>>
save attachments from a particular email address to a particular folder
<<
If you have a way to get the company name from the email - maybe the domain name from the address - you can do this. A contact for the sender with the company name filled out would also work. It won't work if they use a Gmail address or the sender changes though.