I recently ran into a situation where i needed this functionality, so i used the already existing code here and polished it up a bit. It handles multiple merge fields in the subject line as well, and i am running it on O365 so it should work with the latest office versions.
How to get it to...