Solved

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

Posted on 2011-09-12
3
281 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

930 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

9 Experts available now in Live!

Get 1:1 Help Now