MVP. Thank you. This macro works exactly as expected!
Additional note: depending on the organization's macro settings, you may run into an issue that does not actually allow you to run this macro.
- To get it working, first check your settings to make sure macros are even allowed:
File > Options > Trust Center > Macro Settings
If "Notifications for digitally signed macros, all other macros disabled" is allowed, then proceed. (It's not recommended to enable all macros — so we will certify our own macro in the next steps and that will work with the default setting)
- Launch "SELFCERT.EXE" located in C:\Program Files (x86)\Microsoft Office\root\Office16 ; your file location might defer depending on your Office installation, this is where I found mine.
- Name your certificate, then hit OK
- Re-open Visual Basic from Outlook (Alt + F11) and select your Module (that Kristupas Petrauskas shared), go to Tools > Digital Signature which pops up a dialog box. Click "Choose" and the certificate you just created should appear by default (if not it will be in C:\Windows\Prefetch)
- Save your module (Ctrl + S) and quit Visual Basic (Alt + Q)
That should do the trick!
The final step is to create an easily accessible button for this macro.
- File > Options > Quick Access Toolbar
- Click "Choose commands from" drop-down and select "Macros", then click your newly added macro and hit "Add" then OK.
- Now you should see a button appear for your newly created, self-certified "ReplyAllWithAttachments" macro.