ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Char(10) or Char(13) in body of email (https://www.excelbanter.com/excel-programming/419933-char-10-char-13-body-email.html)

ryguy7272

Char(10) or Char(13) in body of email
 
I'm trying to use this snippet of code in the body of an email, but I get an
error message saying that the function is not defined.

'some stuff here...
Please let me know if you have any questions!" _
& CHAR(13) & _
'some stuff here...

What am I doing wrong?

Thanks,
Ryan--

--
RyGuy

UglyChicken

Char(10) or Char(13) in body of email
 
On Nov 13, 9:22*am, ryguy7272
wrote:
I'm trying to use this snippet of code in the body of an email, but I get an
error message saying that the function is not defined.

'some stuff here...
Please let me know if you have any questions!" _
& CHAR(13) & _
'some stuff here...

What am I doing wrong?

Thanks,
Ryan--

--
RyGuy


Replace CHAR(13) with Chr(13)

ryguy7272

Char(10) or Char(13) in body of email
 
This works! Thanks so much. One more quick question. How do I get the
entire contents of a cell into the body of the email? I am using this:
..Body = "Dear " & cell.Offset(0, -1).Text

It gives me just the text part of the email, but no numbers. I have text
and numbers together in several cells, such as andy12 and fred22. I get andy
and fred only! I tried this:
..Body = "Dear " & cell.Offset(0, -1).Value

Results were the same.

Please advise.

Thanks so much!!
Ryan---

--
RyGuy


"UglyChicken" wrote:

On Nov 13, 9:22 am, ryguy7272
wrote:
I'm trying to use this snippet of code in the body of an email, but I get an
error message saying that the function is not defined.

'some stuff here...
Please let me know if you have any questions!" _
& CHAR(13) & _
'some stuff here...

What am I doing wrong?

Thanks,
Ryan--

--
RyGuy


Replace CHAR(13) with Chr(13)



All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com