Solved

Paragraph formatting of Outlook email created from VBA

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

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 49

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

770 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