More difficult request...

  • Thread starter Thread starter MHiemstra
  • Start date Start date
M

MHiemstra

I figured out my first question on how to have text display bold and
underlined when I send it to a email maessage. It is called HTML. Now the
next question. I need a function to parse through a memo field and
everytime it finds a Line break I need to insert <br> when passing it
through to HTML.

I know I have seen this done in the past, but I can't think of how to do it.

I know I have to loop through the string and find and replace, but am at a
complete brain freeze. Please Help...
 
You can use the Replace function:

strHTML = Replace( Me!MemoField, vbCrLf, "<br>")
 
replace(YourString,vbcrlf,"<br>")

(...or something like that anyway. Possible that the vbcrlf could be a
chr(10) or chr(13)...but hopefully you'll be able to figure that out.)
 
Back
Top