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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape Mail and Linefeed

Status
Not open for further replies.

Holger

IS-IT--Management
May 18, 2001
9
I sat there on a problem with Netscape Mail. I automatically create mails using ShellExecute:
=================
Public Function OpenEmail(ByVal EmailAddress As String, _
Optional Subject As String, Optional Body As String) As Boolean

Dim lWindow As Long
Dim lRet As Long
Dim sParams As String

sParams = EmailAddress
If LCase(Left(sParams, 7)) <> &quot;mailto:&quot; Then _
sParams = &quot;mailto:&quot; & sParams

If Subject <> &quot;&quot; Then sParams = sParams & &quot;?subject=&quot; & Subject

If Body <> &quot;&quot; Then
sParams = sParams & IIf(Subject = &quot;&quot;, &quot;?&quot;, &quot;&&quot;)
sParams = sParams & &quot;body=&quot; & Body
End If

lRet = ShellExecute(lWindow, &quot;open&quot;, sParams, _
vbNullString, vbNullString, SW_SHOW)

OpenEmail = lRet = 0

End Function
=============================
It works fine but - it doesn't accept any linefeed in the body (vbcrlf, vbcr, vblf, chr(10), chr(13)) if the mail is created in Netscape Mail. But I must set linefeeds! How to do that??? Who knows?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top