line feed in outlook mail

T

touf

Hi,
I've a sub that open the default email client (outlook) using the command
mailto
Public Sub openNewMail()

Dim mailParam As String = "mailto:" & varEmailAddress

mailParam = mailParam & "&Subject=" & varEmailSubject

mailParam = mailParam & "&Body=" & varEmailText

System.Diagnostics.Process.Start(mailParam)

End Sub



How can I insert line feed in the text, I've tried CHR(13), but it doesn't
work.

Thanks
 
H

Herfried K. Wagner [MVP]

touf said:
I've a sub that open the default email client (outlook) using the command
mailto
Public Sub openNewMail()

Dim mailParam As String = "mailto:" & varEmailAddress

After the mail address you must include a "?" character. Notice that you
don't need a "&" in front of "subject:"
mailParam = mailParam & "&Subject=" & varEmailSubject

mailParam = mailParam & "&Body=" & varEmailText

System.Diagnostics.Process.Start(mailParam)

The data must be encoded, the following page (VB6) shows you how to do that:

<http://www.vb-tec.de/shellexe.htm>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top