Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cmd button on Outlook form needs to email form On_ Click()

Status
Not open for further replies.

Labadore

Programmer
Apr 13, 2001
17
US
cmd button on Outlook form needs to email form On_ Click()


I have an Outlook form with a command button that when certain conditions are met on the form, the command button should email or forward that form to certain in house emails. The form is located in a Public folder. If anyone knows the vbscript it would take to do this it would be greatly appreciated. Thank you in advance for all your help.

Labadore
 
You could base your solution on something like:

Sub CommandButton1_click

Set myItem = Application.CreateItem(0)

' Next line adds your text to subject line of email
myItem.Subject = "Whatever subject text you want"

'Next line fills in Message Body
myItem.Body = "Dear Sir," & chr(13) & "blah blah blah"

'Next line defines which mail box to send the request to.
MyItem.To = "someone@somewhere.com"

'Sends the form
MyItem.Send

'Closes form
Item.Delete

End sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top