By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,397 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,397 IT Pros & Developers. It's quick & easy.

SendObject text in body on 1 line

P: n/a
TTD
Hi when I send mail from Access the body puts al my bodydata on 1 line,
though the string contains carraige returns.

strMailadres = Me.Mailer

strPerson = Me.Responsable
strSubject = "Casenr. " & Me.Casenummer & " : " & Left$(Me.CaseOmschr,
20)
strText = "Casenummer: " & Me.Casenummer & Chr(13) & Chr(13) _
& " Received through:" & Me.OntvangstOmschr & Chr(13) & Chr(13) &
Chr(13) & _
" Deadline is at " & Me.Deadline & " " & Me.DeadlineTijd & " Well solve
it." & Chr(13) & _
"Greetings., " & Me.Person

'Mail verzenden
DoCmd.SendObject , , acFormatTXT, strMailadres, , , strSubject, strText,
True

Any idea how to get carriage returns in the mail?
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"TTD" <tt*@hotmail.com> wrote in message
news:c8***********@beast.euro.net...
Hi when I send mail from Access the body puts al my bodydata on 1 line,
though the string contains carraige returns.


You need Chr(13) & Chr(10) in that order.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #2

P: n/a
You can use vbCrLf instead of Chr(13) & Chr(10)
"TTD" <tt*@hotmail.com> wrote in message
news:c8***********@beast.euro.net...
Hi when I send mail from Access the body puts al my bodydata on 1 line,
though the string contains carraige returns.

strMailadres = Me.Mailer

strPerson = Me.Responsable
strSubject = "Casenr. " & Me.Casenummer & " : " & Left$(Me.CaseOmschr,
20)
strText = "Casenummer: " & Me.Casenummer & Chr(13) & Chr(13) _
& " Received through:" & Me.OntvangstOmschr & Chr(13) & Chr(13) &
Chr(13) & _
" Deadline is at " & Me.Deadline & " " & Me.DeadlineTijd & " Well solve it." & Chr(13) & _
"Greetings., " & Me.Person

'Mail verzenden
DoCmd.SendObject , , acFormatTXT, strMailadres, , , strSubject, strText, True

Any idea how to get carriage returns in the mail?

Nov 12 '05 #3

P: n/a
You might want to try vbcrlf instead of Chr(13). It works for me.

Michael
Nov 12 '05 #4

P: n/a
TTD
Thanks Rick, Saintor & Lumpierbritches.

the command vbcrlf works fine.
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.