I'm using the following Function code to create an HTML page:
Function FormatHTML() As String
Dim myHTML As String
myHTML = "<HTML><H2><center><font color=Blue><b>Daily Operations
Status Report</b></font></h2></html>"
myHTML = myHTML & "<body><h3 align=left><font
color=red><u><b>Critical Application Cycle End
Times</b></font></u></h3>"
myHTML = myHTML & "<h3 align=left>  <b>Insurance</b></h3>"
myHTML = myHTML & "<p
align=left> •<b>Insurance DataBase
(Critical Path - BT30004) ended at: " & htmlBT4 & "</b></p>"
myHTML = myHTML & "<p align=left> " &
htmlMVS & "</p>"
End If
myHTML = myHTML & "</body></html>"
FormatHTML = myHTML
End Function
I call the function(FormatHTML) in an Outlook routine which works
great. The problem is the last variable called: htmlMVS. When I do a
debug.print htmlMVS it displays as multiple lines of text, example:
bt30004->bt50001
is00075
hi30004->hi50001
But, when I open the email web page it displays like this:
bt30004->bt50001 is00075 hi30004->hi50001
It's all in one line of text. I need it to display as the user enters
it in the textbox which is in multiple lines and the debug statement
confirms that. I parse the textbox and replace vbCrLf with vertical
tab, that way I don't display control or line feed characters. I hope
someone has an idea for me to try.
Rich
radicaledward - 28 Feb 2004 17:24 GMT
First off it looks like you have some incorrect syntax in your HTML for
example:
> myHTML = "<HTML><H2><center><font color=Blue><b>Daily Operations
> Status Report</b></font></h2></html>"
You shouldn't have a </html> until the end of the webpage, and that can
cause some problems in browsers. As for the htmlMVS - if you are using
standard linefeeds on it will not parse as a line feed in a browser - you
must use a <br> or <p> tag. Web browsers are set up to ignore white space
unless told otherwise with the <pre> tag which indicates preformatted text.
Check to see if it works if you do this:
myHTML = myHTML & "<p align=left> <pre>" & htmlMVS &
"</pre></p>"
> I'm using the following Function code to create an HTML page:
>
[quoted text clipped - 33 lines]
>
> Rich