A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Unable to send email in HTML format



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2010, 01:24 AM posted to microsoft.public.access
Greg
external usenet poster
 
Posts: 748
Default Unable to send email in HTML format

I have the following code and for some reason I am unable to send email in
HTLM format. Email in formated in Rich Text format and I want to add bold
fonts and differnt color to different lines.

Dim strSubject As String
Dim strEmailList As String
Dim strMessage As String
Dim strCopyList As String
Dim strMessage2 As Boolean

strMessage2 = True


On Error GoTo Err_Command75_Click

strSubject = "Outage Notification "
'strEmailList = "joedoe@"
strEmailList = "joedoe@"
'strCopyList = "joedoe@"

strMessage = "Ticket: " & Chr(13) & "Time of Failu " & Chr(13) & "Time
of Resolution: " & Chr(13) & "Description: " & Chr(13) & "Actions being
Taken:" & Chr(13) & "ETA:" & Chr(13) & "Escalation:"
DoCmd.SendObject acSendNoObject, , acFormatHTML, strEmailList,
strCopyList, , strSubject, strMessage, strMessage2



Exit_Command75_Click:
Exit Sub

Err_Command75_Click:
MsgBox Err.Description
Resume Exit_Command75_Click


If Err.Number 2501 Then
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf
& "Error Number: " & _
Err.Number & vbCrLf & "Error Source: SendEmail" & vbCrLf & _
"Error Description: " & Err.Description, vbCritical, "An Error has
Occured! """
End If


Is it possible to write the code so for ex. line "Descrition:" can be set up
to bold font and blue color?

Thanks
  #2  
Old March 21st, 2010, 09:01 AM posted to microsoft.public.access
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Unable to send email in HTML format

Greg wrote:

I have the following code and for some reason I am unable to send email in
HTLM format. Email in formated in Rich Text format and I want to add bold
fonts and differnt color to different lines.


DoCmd.SendObject acSendNoObject, , acFormatHTML, strEmailList,
strCopyList, , strSubject, strMessage, strMessage2


SendObject only supports plain text. The acFormatHTML applies to the object
you might include as an attachment, not the text in the body of the Email.

For what you want you would have to automate an external messaging library
like CDOSys or Outlook.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.