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!

code for Cmd Button on Outlook form that emails that form to...

Status
Not open for further replies.

Labadore

Programmer
Apr 13, 2001
17
US
need to have a button on my outlook form that will email that form to certain specified emails. If anyone knows what that code is please let me know. Thank you in advance for your time and help.

labadore
 
You could try 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