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!

Email via VBA - set the FROM address

Status
Not open for further replies.

rene1000

IS-IT--Management
Apr 9, 2002
89
NL
I have created code to send an email automatically when a button is clicked on a form. I have to set the "edit message
" option to true to be able to set the from address. I do however want this set automatically, so i can fully automatically send the e-mail with the right from address. Can this be done ? (i do have the right to send on behalf of the other user)

the code so far is:

Private Sub button_mail_Click()
subject = "test"
message = "doesn't matter"
attachement = "report1"
addressee = "test@domain.com"

DoCmd.SendObject acReport, attachement, acFormatRTF, addressee, , , subject, message, True

end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top