Solved

Paragraph formatting of Outlook email created from VBA

Posted on 2014-01-07
3
1,040 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 50

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 50

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
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 how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

856 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