+ Reply to Thread
Results 1 to 3 of 3

VBA Creating Outlook email, simple line feed in string to avoid paragraph double spacing?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-16-2018
    Location
    WI
    MS-Off Ver
    2016
    Posts
    56

    Question VBA Creating Outlook email, simple line feed in string to avoid paragraph double spacing?

    Hello again.

    I have excel creating an Outlook email for me, but Outlook is being difficult in that it defaults to automatically double spacing lines with paragraph formatting when any type of line break I am familiar with is entered.
    This applies to vblf, vbcrlf, and vbnewline. It looks like the following:

    Words and stuff (line break)

    second line.

    When manually typing something in outlook, I can achieve a simple, single line feed with shift+enter to achieve this:

    Words and stuff (line break)
    second line.

    Is there some equivalent thing in VBA that can achieve this?

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: VBA Creating Outlook email, simple line feed in string to avoid paragraph double spaci

    You need to use the <br/> tag in the HTML. For example, set the .HTMLBody of the email message to this:

    .HTMLBody = "Words and stuff<br/>second line."
    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Registered User
    Join Date
    02-16-2018
    Location
    WI
    MS-Off Ver
    2016
    Posts
    56

    Re: VBA Creating Outlook email, simple line feed in string to avoid paragraph double spaci

    Quote Originally Posted by WideBoyDixon View Post
    You need to use the <br/> tag in the HTML. For example, set the .HTMLBody of the email message to this:

    .HTMLBody = "Words and stuff<br/>second line."
    WBD
    I was trying to avoid reconfiguring this to use HTML, but it seems I may need to bite the bullet anyways for a few reasons.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Adding a new paragraph between 2 string bodies in VBA email
    By adam1992 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2021, 01:29 AM
  2. Paragraph mark (pilcrow) is automatically converted to a line feed
    By BookNote in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2015, 02:05 PM
  3. Modifying Paragraph Spacing Issue (picture)
    By cmf0106 in forum Word Formatting & General
    Replies: 4
    Last Post: 03-18-2014, 07:12 PM
  4. How can we apply paragraph spacing within a cell?
    By Wes Tracy in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-27-2012, 08:58 AM
  5. Replies: 4
    Last Post: 02-27-2012, 03:13 AM
  6. Replies: 8
    Last Post: 11-07-2008, 09:26 AM
  7. double line spacing using excel 2000
    By Dan in forum Excel General
    Replies: 9
    Last Post: 03-22-2005, 09:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1