Results 1 to 4 of 4
  1. #1
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215

    Chr(13) & Chr(10) in HTML format

    I can't figure out how to get this to work. I have the following:



    myItem.HTMLBody = IIf(IsNull(rst!FirstName), "Dear Former Student", rst!FirstName) & "," & Chr(13) & Chr(10) & Me.EmailBody & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "If you would like to unsubscribe to this email list, please email us at xxx@example.org with UNSUBSCRIBE in the Subject." & Chr(13) & Chr(10) & "<a href='http://www.facebook.com'><img src='C:\Users\John Doe\Desktop\Facebook Logo" & strfilename & ".jpg'></a>"

    The Chr(13)s and Chr(10)s are not doing what they normally would do if it were set as myItem.Body

    How do I make these compatible with my HTMLBody???

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Assuming this is VBA, try vbCRLF instead of "Chr(13) & Chr(10)" and see if that works.

  3. #3
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    Sorry, I figured it out. I used the "<br>" in place of the Chr(13) and Chr(10)

  4. #4
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    for HTML, that would work...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-07-2013, 04:59 PM
  2. Replies: 4
    Last Post: 03-12-2013, 06:49 PM
  3. HTML and VBA
    By tylerg11 in forum Forms
    Replies: 1
    Last Post: 08-23-2012, 05:53 PM
  4. Replies: 1
    Last Post: 01-24-2012, 08:31 PM
  5. Replies: 0
    Last Post: 03-24-2011, 11:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums