Hi
I have a vba macro to send out an email and attached file. when sent, the verbage is just 1 long line of text.
Sub Mail_Workbooks()
Dim OutApp As Object, OutMail As Object, WS As Worksheet, r As Long
Set OutApp = CreateObject("Outlook.Application")
Set WS = Sheets("Sheet1")
On Error Resume Next
For r = 2 To WS.Cells(Rows.Count, "A").End(xlUp).Row
With OutApp.CreateItem(0)
.To = WS.Cells(r, 1).Value
.CC =
.BCC = ""
.Subject = "Order Book Review Wk51"
.Body = "Pls find attached the latest order book detailing past due orders, orders due within the next 14days and any orders that we have not yet received delivery confirmation for. This report will be issued weekly and it is your responsibility to respond with the worksheet fully completed within 48hours of receipt. You should only respond to the SCO Purchasing email address on copy. Do not send back to myself. If there is no attachment, that means you have no open obligations for this week. Any issues, pls do not hesitate to advise by return. ***PLEASE NOTE - OUR LAST RECEIVING DATE FOR 2019 IS 20 DEC 2019***"
.Attachments.Add WS.Cells(r, 2).Value
.Send
End With
DoEvents
Next r
On Error GoTo 0
Set OutApp = Nothing
End Sub
I have a vba macro to send out an email and attached file. when sent, the verbage is just 1 long line of text.
Sub Mail_Workbooks()
Dim OutApp As Object, OutMail As Object, WS As Worksheet, r As Long
Set OutApp = CreateObject("Outlook.Application")
Set WS = Sheets("Sheet1")
On Error Resume Next
For r = 2 To WS.Cells(Rows.Count, "A").End(xlUp).Row
With OutApp.CreateItem(0)
.To = WS.Cells(r, 1).Value
.CC =
.BCC = ""
.Subject = "Order Book Review Wk51"
.Body = "Pls find attached the latest order book detailing past due orders, orders due within the next 14days and any orders that we have not yet received delivery confirmation for. This report will be issued weekly and it is your responsibility to respond with the worksheet fully completed within 48hours of receipt. You should only respond to the SCO Purchasing email address on copy. Do not send back to myself. If there is no attachment, that means you have no open obligations for this week. Any issues, pls do not hesitate to advise by return. ***PLEASE NOTE - OUR LAST RECEIVING DATE FOR 2019 IS 20 DEC 2019***"
.Attachments.Add WS.Cells(r, 2).Value
.Send
End With
DoEvents
Next r
On Error GoTo 0
Set OutApp = Nothing
End Sub