How do I attach a macro to a command button. I have inserted a b.

C

chaselife

I am developing a form in Word for users to fill out on line and then submit
via email as an email attachment. I have inserted a submit button at the end
of the form using the Control Toolbox/Command Button. I now need to attach a
macro to run when the button is clicked. Can someone help.
 
D

Doug Robbins

Right click on the button and select View code from the menu that appears
and then enter the necessary code in the vbe.

See the article "How to send an email from Word using VBA" at:

http://word.mvps.org/FAQs/InterDev/SendMail.htm


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top