Sending email from Access database

  • Thread starter Thread starter tina
  • Start date Start date
T

tina

Hi,

I have a command button in an Access 2002 database that
automatically sends email from Access to Outlook. The code
I use is

Private Sub btnSendEmail2_Click()
DoCmd.SendObject , , acFormatHTML, , , , , , True
End Sub

I have two questions that I am having a hard time figuring
out:
1.) Is there a way to force the font type of the email in
Outlook?
2.) How can I get Outlook to save the sent message in the
Sent Folder of Outlook? Right now it's just sending the
emails, but no keeping any record of it being sent.

Any help would be great!!

Tina
 
The font can be set in the HTML by using the correct tags.

For saving in Sent Items you would need to use Outlook object code via
automation. You would create the MailItem and set its
SaveSentMessageFolder property to the Sent Items MAPIFolder and make
sure that the Boolean DeleteAfterSubmit is False.
 
Back
Top