VBA Email Body message multiple lines

Knockoutpie

Board Regular
Joined
Sep 10, 2018
Messages
75
Office Version
  1. 365
Platform
  1. Windows
How do I make this to have multiple lines? Seems it doesn't like my underscores or date format, but I am using this same format as the file name.

Also, is there a way to get my date format on deadline (2nd line from bottom) to read the date of 8 days from now? Ex: "Thursday, May 28"

VBA Code:
 .Body = "The forecast file for Format(DateAdd("m", 1, Date), "mmm") & "-" & Format(DateAdd("m", 3, Date), "mmm_YYYY") is ready to be updated" _
 & vbNewLine & "If you need to add new customers to your forecast, please insert a new row above your last line item and highlight the new line in yellow. " _
 & vbNewLine & vbNewLine & "DO NOT delete any columns or rows"& vbNewLine & vbNewLine & "DO NOT Freeze panes" _
 & vbNewLine & vbNewLine & "DO NOT HIDE columns but ok to shrink the size so your view is better" _
 & vbNewLine & vbNewLine & "DO NOT Freeze panes" _
 & vbNewLine & vbNewLine & "Deadline to complete is (8 days from now) by 12pm " _
 & vbNewLine & vbNewLine & "Click here to access the file:  " _
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
4,578
VBA Code:
.Body = "The forecast file for " & Format(Date + 1) & " - " & Format(Date + 3) & " is ready to be updated." & _
  vbNewLine & "If you need to add new customers to your forecast, please insert a new row above your last line item and highlight the new line in yellow. " & _
  vbNewLine & vbNewLine & "DO NOT delete any columns or rows." & vbNewLine & vbNewLine & "DO NOT Freeze panes." & _
  vbNewLine & vbNewLine & "DO NOT HIDE columns but ok to shrink the size so your view is better." & _
  vbNewLine & vbNewLine & "DO NOT Freeze panes." & _
  vbNewLine & vbNewLine & "Deadline to complete is " & (Date + 8) & " by 12pm." & _
  vbNewLine & vbNewLine & "Click here to access the file:  "
 
Upvote 0
Solution

Knockoutpie

Board Regular
Joined
Sep 10, 2018
Messages
75
Office Version
  1. 365
Platform
  1. Windows
VBA Code:
.Body = "The forecast file for " & Format(Date + 1) & " - " & Format(Date + 3) & " is ready to be updated." & _
  vbNewLine & "If you need to add new customers to your forecast, please insert a new row above your last line item and highlight the new line in yellow. " & _
  vbNewLine & vbNewLine & "DO NOT delete any columns or rows." & vbNewLine & vbNewLine & "DO NOT Freeze panes." & _
  vbNewLine & vbNewLine & "DO NOT HIDE columns but ok to shrink the size so your view is better." & _
  vbNewLine & vbNewLine & "DO NOT Freeze panes." & _
  vbNewLine & vbNewLine & "Deadline to complete is " & (Date + 8) & " by 12pm." & _
  vbNewLine & vbNewLine & "Click here to access the file:  "
learned something new, thanks so much!
 
Upvote 0

Forum statistics

Threads
1,186,449
Messages
5,957,905
Members
438,330
Latest member
OCCY1221

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top