473,406 Members | 2,404 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,406 software developers and data experts.

vbCrLF issues while trying to replace a sentence in a HTML e-mail model.

41 32bit
Hello everybody, good morning.
Once more I come to you to request some help for VBA and other information.

This time, I am facing some problems to change a sentence in the body of an HTML e-mail due to the need of changing the line in the new sentence.

Please consider the following.

In my original .oft file (Outlook's e-mail model), the e-mail body contains a string that is "ItmLst".

In other point of the software I have a variable called Lst that contains a list of lines that I would to use to replace the string "ItmLst". The content of this variable is another string like
"xxxxxxxx: xxxxx xxxx: xxxxxxx xxxxx: xxxx" + vbCrLf + " yyyyy yyyy: yyyyyyy yyyyy: yyyy" + vbCrLf +
" zzzzz zzzz: zzzzzzz zzzzz: zzzz"

My sentence to replace both strings is

.HTMLBody = Replace(.HTMLBody, "ItmLst", Lst).

But when I do that and the original information in .HTMLBody is replaced, all the vbCrLf information, just desappear.
Similarly the duplicated spaces also disappear.

Could somebody help me to solve this question or lead me to some text for me to read in order to help?
I have tryed to understand some existing texts, but really could nod find the solution.

Best regards

Ricardo



Hi Everybody...
Just few minutes after inserting the information here, reading some other information, I have learned that in HTML we don't use vbCrLf but <br/> instead.
Also about the spaces, I have noticed that HTML will condense multiple characters chr$(32) in just one chr$(32), but this will not occour if I use chr$(160) instead.

Thank you any way...
Best regards
May 19 '17 #1
0 3262

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ann | last post by:
Hi, I am trying to send a html email from a php script. This script emails a common information to all the members in the database. The only problem is I cannot specify colors, hyperlinks...
1
by: Tim Burblehoff | last post by:
Is it possible to send an HTML email through CDONTS without formatting it into one big long string?
5
by: Mike | last post by:
I am creating both a text and html version of the same newsletter and sending using CDOSYS. Both of them incorporate a list of stories drawn from a database which are assigned to a variable...
2
by: Andrew Banks | last post by:
I have a text box which allows users to input the content for a HTML email. I need to maintain the line breaks as the user enters them in the text box when I send the email. I'm assuming I need...
6
by: jiing24 | last post by:
I try to use regexp to replace some html tags in DOM, but the result seems some problems, ================================ <Script language="javascript" type="text/javascript"> var config =...
0
by: akylitis | last post by:
Hello All: I am trying to understand how to set the ContentBase of an HTML email I'm sending using CDO. The HTML source can be any .aspx page on on the website. Basically, I'm creating an...
2
by: akylitis | last post by:
Hello: Anyone have an opinion on the best way to formulate a dynamic HTML email? Thus far I have figured out that the only way to "build" the HTML prior to the email (I'm using System.Net.Mail)...
0
by: MRW | last post by:
I've been looking all over for a solution, and I've found similar problems, but nobody with an answer. Any help would be appreciated. I have a template for an HTML email which is an aspx file...
7
by: geek7 | last post by:
OK, I'm trying to create an email and when it sends the email, it mostly works except that there are '!' inserted at some spots. Checking the html source of the email, looks like they are...
3
by: raamay | last post by:
I am trying to embed company logo (image) in an html email which i am sending using PHP mail function. I tried the following way but didnt work. So, I am not sure how to go about. Please see my code...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.