A
albycindy
I'm using a code (below) to email someone which should be fine, but I'd like
to enter the following the body of the email.
Dear Someone *
*
Please find attached etc etc etc*
*
Thanks
I just don't know how to code the returns at the end of the sentence into VB
(where I've put *). Any help appreciated.
Thanks
Private Sub cmdEmailLynx_Click()
Me.NotificationDate = Now()
Me.AdminName.SetFocus
Me.AdminPosition.SetFocus
Me.AdminPhone.SetFocus
Me.AdminEmail.SetFocus
Dim strWhere As String
strWhere = "[CRDNumber] = " & Me.[CRDNumber]
If Me.Dirty Then
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Enter all information required!", vbExclamation
Else
DoCmd.OpenReport "rptLynxRequest", acViewPreview, , strWhere
DoCmd.OutputTo acOutputReport, "rptLynxRequest", acFormatSNP,
strSavedClaim
Dim strSavedClaim As String
strSavedClaim = "C:\Temp\" & "rptLynxRequest" & ".snp"
Dim Olk As Object, OlkMsg As Object
Set Olk = CreateObject("Outlook.Application")
Set OlkMsg = Olk.CreateItem(0)
With OlkMsg
.To = "(e-mail address removed)"
.Subject = "Claim " & Me![ConsignmentNumber]
.Body = "Dear Jonathan"
.Attachments.Add ("C:\Temp\rptLynxRequest.snp")
.Display
End With
Set Olk = Nothing
Set OlkMsg = Nothing
End If
End Sub
to enter the following the body of the email.
Dear Someone *
*
Please find attached etc etc etc*
*
Thanks
I just don't know how to code the returns at the end of the sentence into VB
(where I've put *). Any help appreciated.
Thanks
Private Sub cmdEmailLynx_Click()
Me.NotificationDate = Now()
Me.AdminName.SetFocus
Me.AdminPosition.SetFocus
Me.AdminPhone.SetFocus
Me.AdminEmail.SetFocus
Dim strWhere As String
strWhere = "[CRDNumber] = " & Me.[CRDNumber]
If Me.Dirty Then
Me.Dirty = False
End If
If Me.NewRecord Then
MsgBox "Enter all information required!", vbExclamation
Else
DoCmd.OpenReport "rptLynxRequest", acViewPreview, , strWhere
DoCmd.OutputTo acOutputReport, "rptLynxRequest", acFormatSNP,
strSavedClaim
Dim strSavedClaim As String
strSavedClaim = "C:\Temp\" & "rptLynxRequest" & ".snp"
Dim Olk As Object, OlkMsg As Object
Set Olk = CreateObject("Outlook.Application")
Set OlkMsg = Olk.CreateItem(0)
With OlkMsg
.To = "(e-mail address removed)"
.Subject = "Claim " & Me![ConsignmentNumber]
.Body = "Dear Jonathan"
.Attachments.Add ("C:\Temp\rptLynxRequest.snp")
.Display
End With
Set Olk = Nothing
Set OlkMsg = Nothing
End If
End Sub