G
Guest
I am trying to insert a line break. I have a button that the user clicks and
then the text goes into Outlook. What is happening is that all of the text
is running together. Does the Chr(10) & Chr(13) work in Outlook?
Private Sub Command29_Click()
On Error GoTo Err_Command0_Click
Dim stext As String
Dim sAddedtext As String
If Len(txtMainAddresses) Then
stext = txtMainAddresses
End If
If Len(txtCC) Then
sAddedtext = sAddedtext & "&CC=" & txtCC
End If
If Len(txtBCC) Then
sAddedtext = sAddedtext & "&BCC=" & txtBCC
End If
If Len(txtSubject) Then
sAddedtext = sAddedtext & "&Subject=" & txtSubject
End If
If Len(txtBody) Then
sAddedtext = sAddedtext & "&Body=" & txtBody & Chr(10) & Chr(13) &
txtProducts1 & txtbody2
End If
'If Len(txtAttachment) Then
' sAddedtext = sAddedtext & "Attach=" & Chr$(34) & txtAttachment & Chr
$(34)
'End If
stext = "mailto:" & stext
If Len(sAddedtext) <> 0 Then
Mid$(sAddedtext, 1, 1) = "?"
End If
stext = stext & sAddedtext
' launch default e-mail program
If Len(stext) Then
Call ShellExecute(hwnd, "open", stext, vbNullString, vbNullString,
SW_SHOWNORMAL)
End If
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
'End If
End Sub
then the text goes into Outlook. What is happening is that all of the text
is running together. Does the Chr(10) & Chr(13) work in Outlook?
Private Sub Command29_Click()
On Error GoTo Err_Command0_Click
Dim stext As String
Dim sAddedtext As String
If Len(txtMainAddresses) Then
stext = txtMainAddresses
End If
If Len(txtCC) Then
sAddedtext = sAddedtext & "&CC=" & txtCC
End If
If Len(txtBCC) Then
sAddedtext = sAddedtext & "&BCC=" & txtBCC
End If
If Len(txtSubject) Then
sAddedtext = sAddedtext & "&Subject=" & txtSubject
End If
If Len(txtBody) Then
sAddedtext = sAddedtext & "&Body=" & txtBody & Chr(10) & Chr(13) &
txtProducts1 & txtbody2
End If
'If Len(txtAttachment) Then
' sAddedtext = sAddedtext & "Attach=" & Chr$(34) & txtAttachment & Chr
$(34)
'End If
stext = "mailto:" & stext
If Len(sAddedtext) <> 0 Then
Mid$(sAddedtext, 1, 1) = "?"
End If
stext = stext & sAddedtext
' launch default e-mail program
If Len(stext) Then
Call ShellExecute(hwnd, "open", stext, vbNullString, vbNullString,
SW_SHOWNORMAL)
End If
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
'End If
End Sub