Word - SUBMIT button to email

G

Guest

I am creating a form for people to enter their information and then at the
end I want them to submit it to an email address. Can you please show me
how to write this code? I'm not familiar wth Macro or VBA so details
instructions is greatly appreciated. Thank you in advance for your help
 
G

Guest

Click on the Command Button in the Control toolbox toolbar.

Double click on the command button, this will open up the VB editior and
under the following..

Private Sub CommandButton1_Click()

Copy and paste this piece of code

ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
.Subject = "New subject goes here"
.AddRecipient "Your email address goes here"
.Delivery = wdAllAtOnce
End With
ActiveDocument.Route

End Sub

change text in the Quotes ("") for the subjuect of the email and address
where you want to send it too.

Hope this helps,

Gav.
 

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