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
" 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