+ Reply to Thread
Results 1 to 6 of 6

Email newly created line in excel workbook

  1. #1
    Registered User
    Join Date
    11-20-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    3

    Email newly created line in excel workbook

    Hi all,

    I am very new to excel but am in the process of working on a project where I need to create an excel DataBase and then send the newest submission to another department using the sendmail function.

    I have the form working fine and it correctly writes to the DB, however the present script I use for SendMail is only for the active workbook.

    The code I am using is as follows:

    Please Login or Register  to view this content.
    Can you please advise if I can actually just send the newest line created in excel from the active workbook as opposed to the whole active workbook?

    I have looked in the forum but unable to find the answer as of yet, it is possible I am looking in the wrong part of forum.
    Last edited by klospros; 11-20-2014 at 07:35 AM.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Email newly created line in excel workbook

    I pulled this from the MSDN, and modified the range to target the row currently targeted.

    Please Login or Register  to view this content.
    Last edited by daffodil11; 11-21-2014 at 09:56 AM.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    11-20-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    3

    Re: Email newly created line in excel workbook

    Thank you for your reply.

    I have tried the code and it sends the email fine, however it only sends an empty worksheet called 'sheet1' as oppoesed to the line from a worksheet called 'DevRequests'

    Ideally what I would like to achieve, is to pull the data from the subject field and add to the subjuct line in outlook, anf the data in the description field into the body within outlook but only for the newly created line. I have no idea if this is possible though?

    The code I am using to submit the data from the form is as follows:

    Please Login or Register  to view this content.
    I am have created the form that is activated from a worksheet called 'Dev Submission' that then writes the data to the 'DevRequests' worksheet.

    Thanks you in advance.

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Email newly created line in excel workbook

    Okay, so I actually ripped the code apart and made it work for you.

    Right before you copy your code over to the database:

    Please Login or Register  to view this content.
    Last edited by daffodil11; 11-21-2014 at 10:35 AM. Reason: forgot object dimensions. derp.

  5. #5
    Registered User
    Join Date
    11-20-2014
    Location
    England
    MS-Off Ver
    2010
    Posts
    3

    Re: Email newly created line in excel workbook

    Thank you so much, that works perfectly. I am so grateful

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Email newly created line in excel workbook

    I knew nothing about the email merge running into this, so I learned a bunch too.

    Putting that snippet into the code vault!

+ 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. Extract data from a newly created workbook with a changing name based on a date.
    By Rigoberto in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2013, 10:02 AM
  2. use existing creation date of workbook with newly created .saveas workbook
    By dwr0211 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2011, 12:42 PM
  3. Using a macro to add code to a newly created workbook.
    By Alagard in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2010, 06:08 PM
  4. Open newly created macro from new workbook
    By stubarso in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-06-2010, 02:30 PM
  5. Saving Workbook in newly created directory
    By sgreni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-19-2009, 11:42 AM

Tags for this Thread

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