+ Reply to Thread
Results 1 to 5 of 5

format email body

  1. #1
    Registered User
    Join Date
    10-27-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    format email body

    Hi all,

    I am using a makro to create an email. My Email body looks as follows:
    .HTMLBody = "Hi" & " " & FirstName & "<br>" & "<br>" & _
    "http://www.google.com"

    This works fine, but I would like to make the following 2 adjustments:
    1) Google should be a hyperlink you can click on
    2) I want it to be a bit further to the right (so basically 10 spaces in front of it)

    Can anybody help me with that?

    Kind regards,
    Matthias

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: format email body

    Hello Matthias0156,

    To generate 10 spaces you need to use a special HTML character code for space. The reason is HTML only allows a single space between elements.

    The code to use for an HTML space is &nbsp;

    Hyperlinks are created using Anchor Tags <a href="http://www.google.com/" >Google</a>
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-27-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: format email body

    Hi Leith Ross,

    thanks for your reply.
    THe statement

    .HTMLBody = <a href="http://www.google.com/" >Google</a>
    does not work.

    And I also cannot manage to use &nbsp;

    What else do I need to consider?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: format email body

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    10-27-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: format email body

    That's awesome. Works perfect!
    Thanks you very much for your help!

+ 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] Format the font and color of email body while runing macro from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2014, 05:14 AM
  2. excel workbook to copy word document and format in email body
    By Dabbler39 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2012, 02:36 PM
  3. [SOLVED] Macro to body of email from word & excel - can't get HTML format correct
    By MacroMess in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2012, 01:32 PM
  4. Replies: 4
    Last Post: 02-27-2012, 03:13 AM
  5. Excel 2007 : Email 2007 excel format in body of mail
    By dbdanboat in forum Excel General
    Replies: 1
    Last Post: 01-21-2011, 07:47 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