none
using '@' character as character and not as vbNewLine RRS feed

  • Question

  • Dear All,

     

    Here is the code:

     

         MailDoc.Body = _
                Replace("Dear " & _
                cl(, 2) & "," & _
                vbNewLine & _
                vbNewLine & _
                "Firs name:  " & cl(, 3) & "@Last name:  " & cl(, 5) & _
                vbNewLine & _
                vbNewLine & _
                cl(, 7) & _
                "email@address.com", "@", vbCrLf)

     

    In the body of the email a "email@address.com" is appeared in the following form:

    email

    address.com

     

    It is because '@' is used as vbNewLine, but I want to use as a simple character in the email address. What should I do?

    Many thanks for the answers in advance!

     

    Ben

    Thursday, November 24, 2011 11:54 AM

Answers

  • I do not understand why you have the @ in quote marks after the Email address.

    While, I cannot replicate the problem, you might try using:

    "email" & Chr(64) & "address.com"


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    • Marked as answer by togyika Thursday, December 1, 2011 7:51 AM
    Saturday, November 26, 2011 5:38 AM