Hi Everyone,
I am sending emails from a form based on the contents of fields on the form.
It is working fine, but I need paragraphs to appear in the body.
How do I do this?
My script is as follows:
Private Sub Command149_Click()
Dim strEmail As String
Dim strclient As String
Dim strmessage As String
Dim strsubject As String
Dim strSQL As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("outlook.application")
Set objEmail = objOutlook.createitem(olmailitem)
strEmail = Me![Email Address]
strmessage = "Re: Purchase Order # : " & Me!Text152 & Me!Text159 & "Kind Regards, " & Me!Text161
strsubject = Me!Text157 & " " & Me!Text152
With objEmail
.to = strEmail
.subject = strsubject
.Body = strmessage
.send
End With
MsgBox "Email Sent", vbInformation, "Notice"
Set objEmail = Nothing
objOutlook.Quit
Set objOutlook = Nothing
End Sub
Thanks in advance.
N.
I am sending emails from a form based on the contents of fields on the form.
It is working fine, but I need paragraphs to appear in the body.
How do I do this?
My script is as follows:
Private Sub Command149_Click()
Dim strEmail As String
Dim strclient As String
Dim strmessage As String
Dim strsubject As String
Dim strSQL As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("outlook.application")
Set objEmail = objOutlook.createitem(olmailitem)
strEmail = Me![Email Address]
strmessage = "Re: Purchase Order # : " & Me!Text152 & Me!Text159 & "Kind Regards, " & Me!Text161
strsubject = Me!Text157 & " " & Me!Text152
With objEmail
.to = strEmail
.subject = strsubject
.Body = strmessage
.send
End With
MsgBox "Email Sent", vbInformation, "Notice"
Set objEmail = Nothing
objOutlook.Quit
Set objOutlook = Nothing
End Sub
Thanks in advance.
N.