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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I send an email through outlook 1

Status
Not open for further replies.

maupiti

Programmer
Oct 27, 2003
240
US
The code below will open Outlook and fill in the fields,
but it won 't send an email automatically.

How do I send an email through outlook without having to press a "send" button on Outlook, and that after a message
is sent, the "new message" window closes.

//////////////////////

Private Sub Send_Email_Click()
Dim stDocName As String
Dim myemailfieldname As String
Dim cc_field As String

stDocName = "msimn.exe"
myemailfieldname = "abc@yahoo.com"
cc_field = "abc@lycos.com"
DoCmd.SendObject , , stDocName, myemailfieldname, cc_field, , _
"NCR Issue", "Hi. A number have just been generated.", , "Clear Day"

End Sub
 
Just add False or 0 to your arguments

DoCmd.SendObject , , stDocName, myemailfieldname, cc_field, , _
"NCR Issue", "Hi. A number have just been generated.",False, "Clear Day
 
Thank you very much lesw1433 for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top