+ Reply to Thread
Results 1 to 9 of 9

Emailing with HTML Body

  1. #1
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Emailing with HTML Body

    Hi All

    I've created an email from VBA to have a HTML body, so that I can format the text in bold, and the required font.

    Now - the problem I have is the spacing after appears as double spacing - is there something in the code I am doing wrong? I know some of them have double <br> as this is where double spacing is wanted - but where there is just one, it just wants to drop one line. Can anyone help?

    HTML Code: 
    If my answer helped pls click the star =)

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Emailing with HTML Body

    try this attached file
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Re: Emailing with HTML Body

    HI Naveed

    Thanks for the attachment, however it's not the problem with the attachment

    It's the formatting of the words in the email - there is too much spacing inbetween the lines on the body of the email - it's really only this that I need to solve

  4. #4
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Emailing with HTML Body

    Hi -

    The issue is the paragraph. it should have only one instance and should have a closing tag
    Please Login or Register  to view this content.
    event

  5. #5
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Re: Emailing with HTML Body

    legendary - thank you - solved it =D

  6. #6
    Registered User
    Join Date
    12-06-2019
    Location
    Romania
    MS-Off Ver
    2016
    Posts
    22

    Re: Emailing with HTML Body

    Hello,
    I have a similar situation, and don't know how to fix it
    Please Login or Register  to view this content.
    the result is:
    "
    Hello,

    Please find attached a report

    The items that are listed below are only a combo of:
    #### i want to remove this empty line ###
    • Line1
    • Line2
    • Line3
    • Line4
    "

    Any ideas ?
    Thank you.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Emailing with HTML Body

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  8. #8
    Registered User
    Join Date
    12-06-2019
    Location
    Romania
    MS-Off Ver
    2016
    Posts
    22

    Re: Emailing with HTML Body

    " #### i want to remove this empty line ### "
    This is that line that come automatically, and i want to remove it.

    I can remove if manually be selecting: Remove space before paragraph

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Emailing with HTML Body

    Quote Originally Posted by Rolly_Sefu View Post
    " #### i want to remove this empty line ### "
    This is that line that come automatically, and i want to remove it.

    I can remove if manually be selecting: Remove space before paragraph
    Perhaps you missed the post immediately above yours?
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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] Emailing Sheet via Outlook by VBA - Body is Missing from 1st email only
    By DaveBre in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2014, 11:53 PM
  2. Excel Macro to resize the HTML Body
    By Jovillanueva in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2013, 01:46 AM
  3. Emailing PDF, another attachment, and with range in email body
    By supcussy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-24-2012, 10:03 PM
  4. Macro for emailing attachment & body
    By BigRed333 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2009, 12:15 PM
  5. Emailing from notes: pasting values into mail body
    By matpj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2008, 11:14 AM

Tags for this Thread

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