473,396 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Sending Email Message in HTML from Access

114 100+
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!

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdEmailLetter_Click()
  2. 'Opens Outlook mail message with receipt confirmation and email addresses auto-populated.
  3. On Error GoTo Err_cmdEmailLetter_Click
  4.  
  5. Dim crQ As String
  6. Dim crL As String
  7.     crQ = Chr$(34)
  8.     crL = vbNewLine
  9.  
  10. DoCmd.SendObject acSendNoObject, , , "Enter Client Email Address", "Enter Specialist Email Address", , _
  11.     "Client #" & [ClientID] & " - Notice Notification", _
  12.     [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True
  13.  
  14. Exit_cmdEmailLetter_Click:
  15.     Exit Sub
  16. Err_cmdEmailLetter_Click:
  17.     MsgBox Err.Description
  18.     Resume Exit_cmdEmailLetter_Click
  19. End Sub
Mar 25 '08 #1
2 3311
ADezii
8,834 Expert 8TB
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!

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdEmailLetter_Click()
  2. 'Opens Outlook mail message with receipt confirmation and email addresses auto-populated.
  3. On Error GoTo Err_cmdEmailLetter_Click
  4.  
  5. Dim crQ As String
  6. Dim crL As String
  7.     crQ = Chr$(34)
  8.     crL = vbNewLine
  9.  
  10. DoCmd.SendObject acSendNoObject, , , "Enter Client Email Address", "Enter Specialist Email Address", , _
  11.     "Client #" & [ClientID] & " - Notice Notification", _
  12.     [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True
  13.  
  14. Exit_cmdEmailLetter_Click:
  15.     Exit Sub
  16. Err_cmdEmailLetter_Click:
  17.     MsgBox Err.Description
  18.     Resume Exit_cmdEmailLetter_Click
  19. End Sub
Try:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.SendObject acSendNoObject, , acFormatHTML, "Enter Client Email Address", "Enter Specialist Email Address", , _
  2.     "Client #" & [ClientID] & " - Notice Notification", _
  3.     [txtSalutation] & crL & crL & [txtBody] & crL & crL & [txtClosing] & crL & crL & [txtContact], True
Mar 26 '08 #2
martin DH
114 100+
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.
Mar 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
2
by: Jim in Arizona | last post by:
I've made an application that is a computer problems (tickets) system. The employee goes to a web page and posts the comptuer problem they're having. Then, the IS staff goes to another webpage...
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
4
by: Roger Withnell | last post by:
I'm sending Russian text in an email generated from the website which displays in the email as ?????????? The website is set to codepage 65001 and the charset to utf-8. Please advise. ...
2
by: ChrisA | last post by:
I'm sending email from my ASP.NET 1.1 app, and it works fine providing the BodyFormat of the System.Web.Mail.MailMessage is set to Text. If I change to Html format, it breaks. Here's the code: ...
7
by: Ray Booysen | last post by:
Hi all I'm sending email via ASP.NET in HTML mode. Each email has exactly one attachment and I do have full access to the SMTP server. However, if I send the email in HTML format, the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.