Option Explicit should go at the top of the module. It forces you to declare your variables and is good practice.
The test macro saves you the bother of sending messages to test the code.
Did you see the comment in the line beginning .Display ?
Change .Display to .Send when you are happy with the result.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|