Solved

Can I control the spacing generated by <br> when generating emails from vba?

Posted on 2011-09-12
3
285 Views
Last Modified: 2012-05-12
The following is email text generated from the vba code below. Using 2 <br> gives me the large space between paragraphs. Using 1 <br> gives too small of a space. Is there any way to get an equivalent of 1 1/2 <b> to create a spacing size in between these 2?

This is a follow-up email regarding the upcoming ... A paper copy of these documents is also being sent to you. This ...will be held at .... Attached, please find a copy of the ... for your review, and an electronic version ... A paper copy of these documents is also being sent to you.

The Letter identifies the materials that will be required .... Please take a moment to review ... ensure that these materials are available to the team.
The following information should be submitted to our office at least one week prior to the start ...is preferred.
• Balances for the ... (listed on the first page of the attached letter) as of th...
• A list of .. as of the test month cutoff date incl....

strBody = strBody & "This is a follow-up email regarding the upcoming ...  A paper copy of these documents is also being sent to you. " & _
"This ...will be held at .... Attached, please find a copy of the ... for your review, and an electronic version ... A paper copy of these " & _
"documents is also being sent to you." & "<br>" & "<br>" & _
"The Letter identifies the materials that will be required .... Please take a moment to review ... ensure that these materials are available to " & _
"the team." & "<br>" & _
"The following information should be submitted to our office at least one week prior to the start ...is preferred." & "<br>" & _
Chr(149) & "   Balances for the ... (listed on the first page of the attached letter) as of th..." & "<br>" & _
Chr(149) & "   A list of .. as of the test month cutoff date incl...."
0
Comment
Question by:newbie46
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 167 total points
ID: 36524118
It's up to each individual HTML renderer as to how they want to display a <br /> tag. You might try adding CSS to the tag. You'll just have to test it to see if it works or not.

For the CSS, you can try:

<br style="line-height: 1.5;" />

Open in new window

0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 166 total points
ID: 36525466
As noted, the fact that it is vba-generated isn't important.
It's html, and whatever is rendering that html is what is ruining your esthetic.

Given the plethora of mail programs, this may not be worth obsessing over.
How it will look has too many variables for you to control completely.
Either give up on html and send a document--which you can control--or give up on micro-managing format.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 167 total points
ID: 36525816
Yeah,

I'll do HTML if I need hyperlinks, ...etc

But for fonts, character/line spacing, ...etc, ...I don't bother...

<How it will look has too many variables for you to control completely.>
True.
Certain HTML syntax is now deprecated, different web browsers, different web browser versions, User Zoom levels, ...etc


Also, remember that there are still some email systems where users are told set the reader to "Plain Text".

Finally note that HTML in the message body will trigger most email scanning programs that the email is spam.
Thus either send it to the junk folder, or delete it outright...

Not worth the trouble IMHO...


JeffCoachman
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question