Solved

Paragraph formatting of Outlook email created from VBA

Posted on 2014-01-07
3
967 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
  • 2
3 Comments
 
LVL 48

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 48

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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…

743 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

10 Experts available now in Live!

Get 1:1 Help Now