s-o-s
Active Member
- Joined
- Apr 14, 2002
- Messages
- 384
Every week I send out an several Emails to a long distribution list. I have decided to automate this and have got most of it working. I need to include some extra text see below but have hit a limit that stops the macro. It is happy with the 1st 3-4 lines but after that...Error
Anyone got any ideas for getting around this problem???
Thanks in advance.
The code I am using is as follows:
Sub TestMail()
Workbooks("Book1.xls").HasRoutingSlip = True
M1 = "Please find attached the Revenue Analysis Report for the week ending " & Date & Chr(10)
M2 = "If you have any problems please contact me." & Chr(10) & Chr(10)
M3 = "Best regards" & Chr(10) & "S-O-S" & Chr(10)
M4 = "Cost Accountant" & Chr(10) & "Company Name" & Chr(10)
M5 = "T: 99999 999999" & Chr(10) & "F: 99999 999999" & Chr(10)
M6 = "M: 99999 999999" & Chr(10) & Chr(10)
M7 = "This is an automated distribution please ignore the routing request that appears below"
With Workbooks("Book1.xls").RoutingSlip
.Delivery = xlAllAtOnce
.Recipients = Array("TestDL")
.Subject = "Revenue Analysis Report - " & Date
.Message = M1 & M2 & M3 & M4 & M5 & M6 & M7
End With
Workbooks("Book1.xls").Route
End Sub
Anyone got any ideas for getting around this problem???
Thanks in advance.
The code I am using is as follows:
Sub TestMail()
Workbooks("Book1.xls").HasRoutingSlip = True
M1 = "Please find attached the Revenue Analysis Report for the week ending " & Date & Chr(10)
M2 = "If you have any problems please contact me." & Chr(10) & Chr(10)
M3 = "Best regards" & Chr(10) & "S-O-S" & Chr(10)
M4 = "Cost Accountant" & Chr(10) & "Company Name" & Chr(10)
M5 = "T: 99999 999999" & Chr(10) & "F: 99999 999999" & Chr(10)
M6 = "M: 99999 999999" & Chr(10) & Chr(10)
M7 = "This is an automated distribution please ignore the routing request that appears below"
With Workbooks("Book1.xls").RoutingSlip
.Delivery = xlAllAtOnce
.Recipients = Array("TestDL")
.Subject = "Revenue Analysis Report - " & Date
.Message = M1 & M2 & M3 & M4 & M5 & M6 & M7
End With
Workbooks("Book1.xls").Route
End Sub