View Single Post
 
Old 05-25-2017, 04:33 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

There is a line missing from the code.
Immediately after
Code:
.Show
there should be a line
Code:
If .Tag = 0 Then GoTo lbl_Exit
which will allow you to click CommandButton2 to cancel the process.

What 'button'? For running the process, create a button on the ribbon/QAT (Quick Access Toolbar) to run the macro 'ReplaceFromUserForm'
This will open the userform and allow you to enter the data, then the message is created.
You may run into problems with Outlook security - in which case see
http://www.gmayor.com/create_and_employ_a_digital_cert.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote