Mailto: "Need line breaks in body"

C

Chad Dittmer

I'd appreciate anyone's help with this. I'm trying to open an email
window and have it auto fill from vb.net. It works, except I can't
get line breaks in the body. I've tried:
vbLf
vbCrLf
Environment.NewLine
sendkeys
<br>
and multiple "&body="
Nothing happens with the above.

System.Diagnostics.Process.Start("mailto:" &
Trim(IIf(IsDBNull(dr("Email")), "", dr("Email"))) & "?subject=Pick
Up&body=" & strBody)

Thanks
 
H

Herfried K. Wagner [MVP]

Chad Dittmer said:
window and have it auto fill from vb.net. It works, except I can't
get line breaks in the body. I've tried:
vbLf
vbCrLf
Environment.NewLine
sendkeys
<br>
and multiple "&body="
Nothing happens with the above.

System.Diagnostics.Process.Start("mailto:" &
Trim(IIf(IsDBNull(dr("Email")), "", dr("Email"))) & "?subject=Pick
Up&body=" & strBody)

Notice that the URL needs to be URL encoded. I didn't test if this works
with embedded newlines with news clients properly...

Opening files, applications, Web documents, and the mail client
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en>
 

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