+ Reply to Thread
Results 1 to 5 of 5

VBA Send Email and Files to Recipients On List

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Send Email and Files to Recipients On List

    Hi, I wonder whether someone may be able to help me please.

    Using a tutorial I've found here: http://www.rondebruin.nl/win/s1/outlook/amail6.htm I'm trying to put togther a script which runs through a list of potential email recipients and where the signal is set to "yes", attach two files and send an emal to the chosen recipient.

    The format of the sheet is as follows:

    Column B - Recipient Name
    Column C- Recipients Email Address
    Column B - Recipient Name
    Column D - Send Email Signal
    Columns E-F - Links to files to attach

    The code below is the script which I've put together so far:

    ***UPDATED CODE***
    Please Login or Register  to view this content.
    I've tried to adapt the code at this point so that the range starts from row 4 until the last row:

    Please Login or Register  to view this content.
    I can recieve the email without a problerm, but the attachments are not attached to the email.

    I just wondered whether someone could possibly look at this please and let me know where I'm going wrong.

    Many thanks and kind regards
    Last edited by hobbiton73; 03-17-2014 at 06:25 AM.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Send Email and Files to Recipients On List

    What are the value of these?
    Please Login or Register  to view this content.
    Are they complete paths? Can you attach your workbook as an example?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Send Email and Files to Recipients On List

    Hi @Solus Rankin, thank you for taking the time to reply to my post.

    I'm unable to post a worbook at the moment, but I can confirm that the values in column C is the mail address for the recipient and the values in columns E and F are the file paths to the files.

    Having looked at this throughout the day, the main issue I have is that I'm unable to adapt the code so that the script starts looking for the values in columns E and F starting at row instead of row 1. I can sort the rest out.

    I did try the obvious and change the reference of row 1 to row 4 and the relevant columns in the following section of code, but the email wasn't created, so I've clearly done something wrong.

    Please Login or Register  to view this content.

    Many thanks and kind regards

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: VBA Send Email and Files to Recipients On List

    To really get a grasp on what you're trying to achieve it would be much easier with an example workbook.

  5. #5
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Send Email and Files to Recipients On List

    Hi @Solus Rankin, I just wanted to let you know that I've got this to work.

    I'd realised that the columns which contain the file paths must be the actual file paths and not the 'Displayed Name'. I've now changed this and the macro works fine.

    Many thanks for all your time and trouble.

    All the best and kind regards

+ 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. send email to multiple recipients
    By plans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2014, 09:26 AM
  2. [SOLVED] How to send Lotus email with VBA to more recipients and also to more copy recipients
    By Sachy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-20-2013, 03:23 PM
  3. Send email to many recipients and a CC list in Lotus Notes using Excel
    By Jimmy0306 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2009, 01:13 PM
  4. Send email to many recipients using Excel...almost
    By Jimmy0306 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2009, 07:36 PM
  5. Send email to multiple recipients
    By Court16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2009, 05:20 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