473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HTMLBody and variable

Hi everybody,

It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?

- this line write a bold html phrase in the email body
..HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"

- this line produce an empty body. The variable TableData contains all
the required HTML to construct the table. I Use Response.Write and see
all the code in it..
..HTMLBody = "<HTML><HEAD><BODY>" & TableData & "</BODY></HTML>"

thanks in advance
Jul 19 '05 #1
6 2484
HTMLBody field of what???

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Serge Myrand" <in**@softdelirium.qc.ca> wrote in message
news:41***************@softdelirium.qc.ca...
Hi everybody,

It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?

- this line write a bold html phrase in the email body
.HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"

- this line produce an empty body. The variable TableData contains all
the required HTML to construct the table. I Use Response.Write and see
all the code in it..
.HTMLBody = "<HTML><HEAD><BODY>" & TableData & "</BODY></HTML>"

thanks in advance

Jul 19 '05 #2
Hi,

The HTMLBody field of CDO.Message

ie:
with iMsg
.To =
.From =
.Subject =
.HTMLBody =
end With

thank's
serge

"Aaron [SQL Server MVP]" wrote:
HTMLBody field of what???

--
http://www.aspfaq.com/
(Reverse address to reply.)

"Serge Myrand" <in**@softdelirium.qc.ca> wrote in message
news:41***************@softdelirium.qc.ca...
Hi everybody,

It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?

- this line write a bold html phrase in the email body
.HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"

- this line produce an empty body. The variable TableData contains all
the required HTML to construct the table. I Use Response.Write and see
all the code in it..
.HTMLBody = "<HTML><HEAD><BODY>" & TableData & "</BODY></HTML>"

thanks in advance


Jul 19 '05 #3
Okay, so now that we know what you're talking about, can you give us more
details?

"It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?"

What does "it seems" and "cannot be assign" mean? Do you get an error
message? If so, what is it? Or does something else happen? Could you do
us a favor and describe the actual symptom, instead of vague stories of
failure?

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #4
Hi Aaron,

The thing is that when I send and email and I construct the HTML code like
shown in the example n°1
the result is an HTML email showing the phrase (bold text): 'Here is the text
body'
In the example n° 2 the body of the email is empty, no text, nothing at all,
even if the variable TableData contains valid HTML code that construct a table
of several row with 5 columns of data. To make shure that TableData contains
all the required HTML code I dumped it on the screen using Response.Write. If
you prefer let say that TableData contains the phrase 'Here is the text body'

It seems mean 'on dirai que' or 'it looks like'. Cannot be assign mean 'If I
refer to a variable rather than a string'.
No I do not get any error message I get an empty body (just the sender and
receipient adresses nothing else).

My question is. Why the body of the email is empty when I assing a variable to
HTMLBody and it is not empty when I assing the HTML string (code) directly?
What I am doing wrong?

Example N°1: this line write a bold html text in the email body
..HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"

Example N°2: this line produce an empty body even if the variable 'TableData'
contains all
the required HTML to construct the table.
..HTMLBody = "<HTML><HEAD><BODY><B>" & TableData & "</BODY></HTML>"

Thank you for your time
serge

"Aaron [SQL Server MVP]" wrote:
Okay, so now that we know what you're talking about, can you give us more
details?

"It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?"

What does "it seems" and "cannot be assign" mean? Do you get an error
message? If so, what is it? Or does something else happen? Could you do
us a favor and describe the actual symptom, instead of vague stories of
failure?

--
http://www.aspfaq.com/
(Reverse address to reply.)


Jul 19 '05 #5
What if you add the missing closing head tag ?

Patrice
--

"Serge Myrand" <in**@softdelirium.qc.ca> a écrit dans le message de
news:41***************@softdelirium.qc.ca...
Hi Aaron,

The thing is that when I send and email and I construct the HTML code like
shown in the example n°1
the result is an HTML email showing the phrase (bold text): 'Here is the text body'
In the example n° 2 the body of the email is empty, no text, nothing at all, even if the variable TableData contains valid HTML code that construct a table of several row with 5 columns of data. To make shure that TableData contains all the required HTML code I dumped it on the screen using Response.Write. If you prefer let say that TableData contains the phrase 'Here is the text body'
It seems mean 'on dirai que' or 'it looks like'. Cannot be assign mean 'If I refer to a variable rather than a string'.
No I do not get any error message I get an empty body (just the sender and
receipient adresses nothing else).

My question is. Why the body of the email is empty when I assing a variable to HTMLBody and it is not empty when I assing the HTML string (code) directly? What I am doing wrong?

Example N°1: this line write a bold html text in the email body
.HTMLBody = "<HTML><HEAD><BODY><B>Here is the text body</BODY></HTML>"

Example N°2: this line produce an empty body even if the variable 'TableData' contains all
the required HTML to construct the table.
.HTMLBody = "<HTML><HEAD><BODY><B>" & TableData & "</BODY></HTML>"

Thank you for your time
serge

"Aaron [SQL Server MVP]" wrote:
Okay, so now that we know what you're talking about, can you give us more details?

"It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?"

What does "it seems" and "cannot be assign" mean? Do you get an error
message? If so, what is it? Or does something else happen? Could you do us a favor and describe the actual symptom, instead of vague stories of
failure?

--
http://www.aspfaq.com/
(Reverse address to reply.)

Jul 19 '05 #6
Hi,

Forget about that it's my mistake. </TABLE> was missing in the variable
(TableData) containing the HTML code, resulting in an empty body email. But it
does not affect the result when using Response.Write TableData, the table
draws on the screen..!

thank you for your time
serge

"Aaron [SQL Server MVP]" wrote:
Okay, so now that we know what you're talking about, can you give us more
details?

"It seems that a variable cannot be assign to HTMLBody field. Am'I doing
something wrong?"

What does "it seems" and "cannot be assign" mean? Do you get an error
message? If so, what is it? Or does something else happen? Could you do
us a favor and describe the actual symptom, instead of vague stories of
failure?

--
http://www.aspfaq.com/
(Reverse address to reply.)


Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott | last post by:
I have an XML Document in a format like: <Variable name="Bob">ABCDEFG</Variable> <Variable name="Steve">QWERTYUI</Variable> <Variable name="John">POIUYTR</Variable> <Variable...
4
by: Frederik Sørensen | last post by:
I include a xslt stylesheet with variables for all the error messages in my system. <xsl:variable name="Banner_error_1"> errormessage 1 for banner </xsl:variable> <xsl:variable...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
10
by: Blaxer | last post by:
There is probably a really easy way to do this, so please forgive me but I would like to set the value of a variable from a variable, an example would be... function Calculate_Something(ByVal...
23
by: Russ Chinoy | last post by:
Hi, This may be a totally newbie question, but I'm stumped. If I have a function such as: function DoSomething(strVarName) { ..... }
0
by: =?Utf-8?B?aXZtb3N0?= | last post by:
I am successfully generating and sending emails from my ASP pages using the CDO.Message and CDO.Configuration objects. I noticed that the character string assigned to .HTMLBody is split within...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
1
by: neerak | last post by:
Can anyone tell me how to save the hyperlinks in my email inbox to a local folder using VBA? I am able to retrieve the url for all hyperlinks by the following codes but having trouble to save the...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.