Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alternative to html emails, format template in access

Status
Not open for further replies.

tonyx666

MIS
Apr 13, 2006
214
GB
i realise that without html emails, the formatting capabilities are very limited.. eg.. you cant use tables or images.. to my knowledge

i believe the alternative is rtf, rich text format, which is just basic text

i have a button on my form that opens outlook and sends an email using the information from my fields.


what i need to know is whether any formatting at all can be added.. in access.. that will jazz up the outlook template even a little bit...

for example.. below is the code for my button.. is there any tags i can add to format the font..

like html tags.. <arial><10pt><blue><bold>"Name: " & Me.Myfield....

i know these tags are non existent, but i just wanted to illustrate what im looking for.. if this can be done.. i would like to see an example of the code, so atleast i can freely add some formating to different paragraphs in my email body..

here is the code at the moment..

Code:
Option Compare Database

Private Sub emailbutton_Click()
On Error GoTo send_Err


Dim strToWhom As String
Dim strMsgBody As String
Dim strSubject As String
Dim temp As Integer

temp = Right([jobday], 1)

strSubject = "Email Title"

If Len(Me.emailadd & vbNullString) = 0 Then
    MsgBox ("Forgot an email address")
    Me.emailadd.SetFocus
Else
    strToWhom = Me.emailadd
    strMsgBody = "How can i format this text"

DoCmd.SendObject , , , strToWhom, , , strSubject, strMsgBody, True
End If

send_Err:
If Err.Number = 2501 Then
MsgBox "THIS EMAIL HAS NOT BEEN SENT!", vbInformation, "Notice!"
End If
End Sub

London Heathrow Cars
 
strBody = "blah1 blah1" _
& ""blah2 blah2"
strBody = strBody & "blah3 blah3" _
& "blah4 blah4"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
ok, i have added a £ symbol to this email

it shows up in outlook.. but i did a test and sent the mail to my gmail..

the £ doesnt display in gmail.. its just the diamond question mark..

so is there a bit of code i can use to display the pound sign because i tried putting this at the start of the html to resolve it but it didnt work.

<meta http-equiv='Content-Type' context='text/html; charset=ISO-8859-1' />

London Heathrow Cars
 
i tried this and it didnt work.. still the diamond

"<td width='305'>&nbsp;&nbsp;<font size='2' face='Arial' color='#000080'>&pound; " & Me.price & "</font></td></tr><tr><td colspan='2'><hr color='#5A79B5'></td></tr><tr><td colspan='2'>&nbsp;</td>

London Heathrow Cars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top