Results 1 to 3 of 3

Cell value in HTMLBody

Threaded View

  1. #1
    Forum Contributor mcinnes01's Avatar
    Join Date
    05-25-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    449

    Cell value in HTMLBody

    Hi,

    I am trying to move away from the message body format in my email scripts; to using a HTML body. In many of the email script I have, the email body is personalised or includes data from the spreadsheet. I just wanted to know how I can do this in HTMLBody. I understand HTML at a basic level, just not sure how to refer to cells values in it.

    This is an example email body I have:

        MessageBody = "MANAGERS DETAILS:" & vbNewLine & vbNewLine _
                     & Sourcewb.Worksheets("INPUT").Range("MNAME") & " - " & Sourcewb.Worksheets("INPUT").Range("EMP") _
                     & vbNewLine & vbNewLine _
                     & Sourcewb.Worksheets("INPUT").Range("JOB") & "   -   " _
                     & Sourcewb.Worksheets("INPUT").Range("SITE") & vbNewLine & vbNewLine _
                     & "DEPARTMENT - " & Sourcewb.Worksheets("INPUT").Range("dept") & "          DIVISION - " _
                     & Sourcewb.Worksheets("INPUT").Range("DIV") & vbNewLine & vbNewLine _
                     & "HEAD OF DEPARTMENT:" & vbNewLine & vbNewLine _
                     & Sourcewb.Worksheets("INPUT").Range("HNAME") & vbNewLine & vbNewLine _
                     & "QUERY DETAILS:" & vbNewLine & vbNewLine _
                     & Sourcewb.Worksheets("INPUT").Range("YNAME") & " - " & Sourcewb.Worksheets("INPUT").Range("YEMP") & vbNewLine & vbNewLine _
                     & "CONTACT NUMBER - " & Sourcewb.Worksheets("INPUT").Range("PHONE")
    Last edited by mcinnes01; 03-15-2011 at 10:39 AM.

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