Email message body in VBA

Anne Troy

MrExcel MVP
Joined
Feb 18, 2002
Messages
2,632
Office Version
  1. 365
Platform
  1. Windows
Can't seem to get it right.

.Body = "Here is some text" & vbLf
"and here is some more text" & vbLf
"and here I want a cell reference from a specific worksheet" HELP! & vbLf
"and then some more text."

Office 2000.

_________________
Anne@TheOfficeExperts.com
TheOfficeExperts
This message was edited by Dreamboat on 2002-10-28 01:14
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
[A1].Value

or

Worksheets("Sheet1").Range("A1").Value

Both these add the cell contents of cell A1 to your message. Hope this helps. JSW

_________________<INPUT type="JSW" value=" Excel On... Coder's!" ID=Text1><spanstyle='font-size:36.0pt;color:#FFCC00'>JSW<o:p></o:p></span>[/b]</p><spanstyle='font-size:36.0pt;color:#FFCC00'>Try and try again, " The way of the coder!"<o:p></o:p></span>[/b]
This message was edited by Joe Was on 2002-10-28 01:24
 
Upvote 0
Just tested:

.Body = "Here is some text" & vbLf & _
"and here is some more text" & vbLf & _
Sheets("Sheet1").Range("A1").Value & vbLf & _
"and then some more text."
 
Upvote 0
Doesn't work, Joe.

Tom, yours doesn't even refer to worksheet range. I'm still working on it.
 
Upvote 0
What kind of range are you referring to? I placed a value in cell A1 of Sheet 1 on a workbook from which I tested this line and it came out just fine on the Outlook email.


You must be referring to some other type of range; if so, what?
 
Upvote 0
Yeah. I had it screwed up. It works fantastic!

Thanks so much guys!

It's T - about 4 hours. Really getting down to the wire on that one!!

REALLY appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,038
Members
448,940
Latest member
mdusw

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