+ Reply to Thread
Results 1 to 5 of 5

Creating Email & Including Specific Corresponding Data from Range

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Creating Email & Including Specific Corresponding Data from Range

    Hello,

    This question is quite tricky for me, any help would be greatly appreciated I'm trying to create a sub that will create and then display a customized/formatted email (in the example below I'm going to be trying to send out email type 1). Within the sub, I'm trying to figure out if there's a way for me to insert specific cells of data from the same row of data as the email type selected while running the counter and then insert them into specific spots of the email body. Essentially, the title would reference the exact project # for the row of data selected under the email type 1 sub. Then, the body of the email would contain references to the project name, end date, balance remaining, and encumbrances remaining all from the same row of data as the email type that is currently being run in the sub.

    I've searched for ways of trying to do this and have not have much luck. Currently I'm receiving a compile error: expected array when I try to run my code with the ReDim Answer13 line highlighted. I'm not sure if my approach is the best so please let me know if you need any further information and thank you for any assistance

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-05-2014
    Location
    Portland, Maine
    MS-Off Ver
    Office 2007, 2010, 2013
    Posts
    10

    Re: Creating Email & Including Specific Corresponding Data from Range

    You have answer13 as long but are trying to assign it as an array

    DNA Tech Solutions
    Daniel Davis

  3. #3
    Registered User
    Join Date
    01-05-2014
    Location
    Portland, Maine
    MS-Off Ver
    Office 2007, 2010, 2013
    Posts
    10

    Re: Creating Email & Including Specific Corresponding Data from Range

    Change dim Answer13 As Long to Dim Answer13 as Variant

    DNA Tech Solutions

  4. #4
    Registered User
    Join Date
    12-22-2014
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Creating Email & Including Specific Corresponding Data from Range

    Great, don't know why I couldn't see that, thank you

    Now when I try to run the code it's giving me a compile error: syntax error and highlights the entire .HTMLBody portion of the code. Any suggestions? Thanks for your help

    Please Login or Register  to view this content.
    Last edited by Pauly723; 12-30-2014 at 02:56 PM.

  5. #5
    Registered User
    Join Date
    12-22-2014
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2013
    Posts
    33

    Re: Creating Email & Including Specific Corresponding Data from Range

    Here's the .HTMLBody portion of my code on its own. I think I'm getting closer, or hope... any assistance would be greatly appreciated

    Please Login or Register  to view this content.

+ 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] sending email with specific range as email body vba modification
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2014, 11:24 AM
  2. How to send email from excel using VBA with Cell Range (Including Images) as Email Body
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2014, 05:06 AM
  3. Analysing data based on change range of data including creating charts
    By EagleInsight in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2014, 11:18 PM
  4. Creating macro to insert a picture by including specific picture name & path
    By NissaFrenchRamsteyn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:40 AM
  5. Replies: 9
    Last Post: 10-12-2010, 12:37 PM

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