Sending Email Message in HTML from Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martin DH
    New Member
    • Feb 2007
    • 114

    Sending Email Message in HTML from Access

    Hello all,
    I'm looking to send an email message from my database at the "click of a button." I've got that part worked out - the only thing is, it sends text only and I would like the message to include our company's fonts, colors, etc.

    So, anyone know of a way to have Access 2003 create this message in HTML verses the text only? Code below. Thanks in advance for any help!

    [CODE=vb]Private Sub cmdEmailLetter_ Click()
    'Opens Outlook mail message with receipt confirmation and email addresses auto-populated.
    On Error GoTo Err_cmdEmailLet ter_Click

    Dim crQ As String
    Dim crL As String
    crQ = Chr$(34)
    crL = vbNewLine

    DoCmd.SendObjec t acSendNoObject, , , "Enter Client Email Address", "Enter Specialist Email Address", , _
    "Client #" & [ClientID] & " - Notice Notification", _
    [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True

    Exit_cmdEmailLe tter_Click:
    Exit Sub
    Err_cmdEmailLet ter_Click:
    MsgBox Err.Description
    Resume Exit_cmdEmailLe tter_Click
    End Sub[/CODE]
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by martin DH
    Hello all,
    I'm looking to send an email message from my database at the "click of a button." I've got that part worked out - the only thing is, it sends text only and I would like the message to include our company's fonts, colors, etc.

    So, anyone know of a way to have Access 2003 create this message in HTML verses the text only? Code below. Thanks in advance for any help!

    [CODE=vb]Private Sub cmdEmailLetter_ Click()
    'Opens Outlook mail message with receipt confirmation and email addresses auto-populated.
    On Error GoTo Err_cmdEmailLet ter_Click

    Dim crQ As String
    Dim crL As String
    crQ = Chr$(34)
    crL = vbNewLine

    DoCmd.SendObjec t acSendNoObject, , , "Enter Client Email Address", "Enter Specialist Email Address", , _
    "Client #" & [ClientID] & " - Notice Notification", _
    [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True

    Exit_cmdEmailLe tter_Click:
    Exit Sub
    Err_cmdEmailLet ter_Click:
    MsgBox Err.Description
    Resume Exit_cmdEmailLe tter_Click
    End Sub[/CODE]
    Try:
    [CODE=vb]
    DoCmd.SendObjec t acSendNoObject, , acFormatHTML, "Enter Client Email Address", "Enter Specialist Email Address", , _
    "Client #" & [ClientID] & " - Notice Notification", _
    [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True[/CODE]

    Comment

    • martin DH
      New Member
      • Feb 2007
      • 114

      #3
      Thanks, Adezii, for the tip. That unfortunately still produces a plain text email message. I think that applies more so to if I was actually sending a database object with the email. Any other ideas?

      Thanks.

      Comment

      Working...