How to add VBA macro code to Outlook and run it once

1. Start Outlook
2. Tools | Macros | Security
3. Choose “Medium”, which will prompt you on whether or not you want to run macros (VBA). You may need to restart Outlook at this point in order for that setting to take effect.
4. Tools | Macros | Visual Basic Editor
5. Doubleclick on This Outlook Session on the left, which will open the code window on the right
6. In the code window, paste the code
7. Optional: View | Immediate to make the immediate window show up
8. Put the cursor in the middle of the code you just pasted
9. Press F5 to run it