Need code to forward message to specific mailbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I am a novice and have a form that I would like to have auto-forwarded to
a specific mailbox when the form is completed. I want to have a command
button in the form to click that will perform this forwarding. I would need
all the code to do this including how to link the command button to this
action. (Total novice, but I'm trying). Thanks for your help!
 
All you need to do is insert a procedure like this in the VBScript editor:

Sub MyCommandButton_Click()
Dim objForwardMail

Set objForwardMail = Item.Forward
objForwardMail.To = "(e-mail address removed)"
objForwardMail.Send
End Sub

Where 'MyCommandButton' is the name of the Command Button control on the form.
 
Back
Top