I am attempting to write some code that will launch the users default email application, and pre-fill the fields - To, Subject, Body
The Process.Start command launches my copy of Outlook and successfully puts everything in the correct fields.
The problem I am having is that the whole body appears on one line, regardless of either the 'vbCrLF' or 'Environment.Newline' or '<BR />' statements that appear.
For example
vb.net Code:
Dim sParams As String = "" Dim emailto = "[email protected]" Dim subject = "This is a subject line" Dim body = "" body = Label1.Text & Environment.NewLine body = body & Label3.Text & Environment.NewLine body = body & Label2.Text sParams = "mailto:" & emailto & "&subject=" & subject & "&body=" & body System.Diagnostics.Process.Start(sParams)
For info - Label2.Text contains 2 short lines of text with a vbCrLf at the end of line 1.




Reply With Quote