Email Database Object Macro

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
I have a tracking database with I use to put notes in and track different problems. Occasionally I would like to email directly from this database asking quesitons or delivering reports. I have the following in my message text section --- =("Due: " & [Due Date] & [Email Notes])
I would like to add a space or a line between the Due Date and teh Email Notes in the body of the email but cannot seem to find a solution for this. I have tried " " and "" but neither work. I would rather have a line break so the email would have the Due Date at the top and below it the Notes. How can I make this happen?

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
If you are passing a string to the body of an email object, you will have to use html to force line wraps or new paragraphs. Email programs will not recognize vba code such as vbCrLf (carriage return/line feed). I will try to write an example here using ASCII character codes which hopefully you will see as the desired result, because this site removes html even if I use code tags. In case it does not save properly, I am trying to write this without the red square brackets:
svBody = "Due: " & [Due Date] & "[<]P[>]" & [Email Notes]

You can look up html character codes to see which other ones you will need. You may have to construct the ENTIRE email body as html to be 100% successful.

Code:
svBody = "Due: " & [Due Date] & "<P>" & [Email Notes]
 
Upvote 0

Forum statistics

Threads
1,216,126
Messages
6,129,020
Members
449,480
Latest member
yesitisasport

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