Solved

Paragraph formatting of Outlook email created from VBA

Posted on 2014-01-07
3
1,117 Views
Last Modified: 2014-01-10
I am currently generating an email from a macro in excel to send to customers.  The problem I am having is that it is double-spacing all the paragraphs when I press enter.  I noticed that if I go into format text / paragraph / spacing for the email and check the box for "don't add space between paragraphs of the same style" pressing enter only single spaces my lines.  How can I get that box checked from vba when creating the email?  I have searched and searched and have not found anything that seems to address my issue.

Here is the .HTMLBody statement I'm using with its attributes:
.HTMLBody = "<p style='font-family:courier new;font-size:14'>" & hlink & "</p>"

Thanks.
0
Comment
Question by:Matt Johnson
[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
  • 2
3 Comments
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 39764408
HI,

YOu could click

Don’t add space between paragraphs of the same style

and then Set As Default

HTML
Regards
0
 

Author Comment

by:Matt Johnson
ID: 39765188
I have multiple users on this tool, so I'd like to control it from my vba code.  If you are saying that isn't possible I can try settting defaults.  However, when I go to set the default as shown above, it isn't staying checked for subsequent emails.  I checked the box referenced above, clicked "set as default", and checked the option on the popup window to set this default for "all documents based on the NormalEmail template.".  If I click ok and then bring up a new email the paragraph spacing box is unchecked again.  I had our it administrator try it also and it did the same thing for him so it doesn't seem to be a permission or security issue.
0
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39765796
Hi,

You could use Shift-Enter instead of Enter so it on't double the spacing

Regards
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

696 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