VBA Email Body message multiple lines

Knockoutpie

Board Regular
Joined
Sep 10, 2018
Messages
116
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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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
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,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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
Back
Top