By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,508 Members | 2,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,508 IT Pros & Developers. It's quick & easy.

Concatanation

P: n/a
I have having trouble building a strong which I want to be the body of an
Email. I have the code worked out which send the email but I cannot
understand why I cannot seem to concatenate a string to use as the body of
the message.

Body = "Subject"
Body2 = " Sub Subject"

Body3 = Body3 & "One " & Chr(9)
Body3 = Body3 & "Two " & Chr(9)
Body3 = Body3 & "Three " & Chr(13)
Mail.Body = Body1 & Chr(13) & Body2 & Chr(13) & Body3

~~~~~~~~~~~~~~~~~~~~
Subject
Sub Subject
~~~~~~~~~~~~~~~~~~~~

The body of the Email when received is just what is between the wavy lines
above - what am I missing?
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Paul Smith wrote:
I have having trouble building a strong which I want to be the body
of an Email. I have the code worked out which send the email but I
cannot understand why I cannot seem to concatenate a string to use as
the body of the message.

Body = "Subject"
Body2 = " Sub Subject"

Body3 = Body3 & "One " & Chr(9)
Body3 = Body3 & "Two " & Chr(9)
Body3 = Body3 & "Three " & Chr(13)
Mail.Body = Body1 & Chr(13) & Body2 & Chr(13) & Body3


I suspect this isn't quite what you are doing. Is this a problem with
CDONTS.NewMail ?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 21 '05 #2

P: n/a
Paul Smith wrote on 24 okt 2004 in
microsoft.public.inetserver.asp.general:
I have having trouble building a strong which I want to be the body of
an Email. I have the code worked out which send the email but I
cannot understand why I cannot seem to concatenate a string to use as
the body of the message.

Body = "Subject"
Body2 = " Sub Subject"

Body3 = Body3 & "One " & Chr(9)
Body3 is not initialized. an error is expected, unless suppressed.
Body3 = Body3 & "Two " & Chr(9)
Body3 = Body3 & "Three " & Chr(13)
Mail.Body = Body1 & Chr(13) & Body2 & Chr(13) & Body3


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #3

P: n/a
Evertjan. wrote:
Body3 is not initialized. an error is expected, unless suppressed.


Good catch. I was going to suggest it was because he was really trying
something like:

Mail.Body = Mail.Body & Chr(13) & Body3

....which is illegal with CDONTS.NewMail, which has *write-only* properties.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.