+ Reply to Thread
Results 1 to 6 of 6

Email code that has different cell values for message body

  1. #1
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Email code that has different cell values for message body

    Hi All,

    Wonder if it's possible? I have code that generates multiple emails based on a table, but I am trying to modify the code so that the message body shows the contents of particular column on different lines for each associated email address

    So the message body would look like the below

    Dan Hardy (Column B),

    Line of customisable text within code

    Sunday 22 Nov 2015 - OFF (Column D)
    Monday 23 Nov 2015 - IN (Column E)
    Tuesday 24 Nov 2015 - IN (Column F)
    Wednesday 25 Nov 2015 - IN (Column G)
    Thursday 26 Nov 2015 - IN (Column H)
    Friday 27 Nov 2015 - IN (Column I)
    Saturday 28 Nov 2015 - IN (Column J)

    Line of customisable text within code

    the code I have is below

    Please Login or Register  to view this content.
    I have attached the file as well if it makes it easier to understand, it may well be a simple solution but the ones that I am trying are just creating blank emails

    Thanks in Advance

    Danny
    Attached Files Attached Files

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Email code that has different cell values for message body

    Maybe :

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Email code that has different cell values for message body

    Hi,

    Thats brilliant it works for the cell look up but I can not seem to add custom lines of text using sMsgBody, I have highlighted below where I am trying to put it

    Please Login or Register  to view this content.
    Thanks Again

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Email code that has different cell values for message body

    Like this, perhaps ?

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Email code that has different cell values for message body

    Brilliant Thank You I had it above Next I not below.

    This code is an adpation but out of the 32 emails it could produce it only produces 18 is there a reason why

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Email code that has different cell values for message body

    You are welcome.

    I tried to replicate the data down, and it is working well (more than one hundred).

    The code processess each cell in Range("C3:C102") which is not blank or zero, does your data meet this conditions ?

+ 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] how to link textbox message as email body using excel VBA code
    By yogi_himalayan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-01-2014, 08:40 PM
  2. Email Message body with reference to cell using VBA coding
    By MakkyD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2013, 03:52 AM
  3. Qutlook email with signature using body message from cell values
    By gmc2k2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2013, 10:11 AM
  4. email excel spreadsheet as body of message, not as attachment
    By Email Spreadsheet as Body of Email Msg. in forum Excel General
    Replies: 6
    Last Post: 06-18-2012, 01:01 PM
  5. Pasting Range from worksheet into Body of Email Message
    By AZGryphon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-10-2012, 06:29 PM
  6. Copy a range to the body in email message
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2008, 02:52 PM
  7. email sheet as message body with chart
    By Nicky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2007, 07:16 AM
  8. [SOLVED] Body message - email
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2006, 07:10 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