Solved

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

Posted on 2011-09-12
3
280 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
3 Comments
 
LVL 74

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now