+ Reply to Thread
Results 1 to 5 of 5

How to insert space lines in mail body content on a macro

  1. #1
    Registered User
    Join Date
    11-03-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32

    How to insert space lines in mail body content on a macro

    Hi,

    I would like to had some space lines in my email body text on a macro and add the name located on F9 at the end of the text.

    Here is my code:

    Please Login or Register  to view this content.

    Here is the way I'd like it to appear in the email body:
    Bonjour,

    Veuillez svp signer les DEUX pages du formulaire en pièce jointe et me le retourner afin que nous puissions procéder le contrat de prêt d'équipement.

    Merci!

    Name(Range F9)

    Thanks in advance,
    Simon
    Last edited by nomis6565; 11-18-2012 at 03:18 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to insert space lines in mail body content on a macro

    Hi Simon,

    There are VB constants to do this. I think you are looking for "vbCrLf" to insert into your string.
    Like:
    strBody = "Bonjour, " & vbCrLf & "veuillez svp signer les DEUX pages .....

    see http://support.microsoft.com/kb/211774
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-03-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: How to insert space lines in mail body content on a macro

    Dear Marvin,

    Thanks for your quick response! Right what I needed!
    Here is my final code and how it appears on the mail body. I'm just wondering why the is no space line after "BONJOUR" like it does between the message and the name at the end?

    Please Login or Register  to view this content.

    Here is how it appears on the body mail:

    Bonjour,
    veuillez svp signer les DEUX pages du formulaire en pièce jointe et me le retourner afin que nous puissions procéder le contrat de prêt d'équipement.

    Merci!
    Simon Larin

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How to insert space lines in mail body content on a macro

    How about

    strBody = "Bonjour, " & vbCrLf & vbCrLf & "veuillez ...

    That will give you that blank line.

  5. #5
    Registered User
    Join Date
    11-03-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: How to insert space lines in mail body content on a macro

    So simple...

    Thanks again,

    Simon

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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