+ Reply to Thread
Results 1 to 4 of 4

Duplicate attachments when using Excel VBA to email

  1. #1
    Registered User
    Join Date
    07-07-2020
    Location
    UK
    MS-Off Ver
    Office 365 - Exel 2016
    Posts
    11

    Duplicate attachments when using Excel VBA to email

    Hi

    Can anyone help with the following issue. I want my code to avoid sending multiple emails to the same address, each line in the spreadsheet will have its own attachment, where there is a duplicate email address it should add all attachments into one email. Each time I run the code at the moment it is only creating one email per address but it is duplicating the attachment from the first line instead of adding from the next.

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Duplicate attachments when using Excel VBA to email

    Var Attachment is outside Do Until loop and always equal Sheet1.Cells(x, 8)
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    07-07-2020
    Location
    UK
    MS-Off Ver
    Office 365 - Exel 2016
    Posts
    11

    Re: Duplicate attachments when using Excel VBA to email

    Thanks! Fixed with the following:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Duplicate attachments when using Excel VBA to email

    Should works as needed.

+ 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. Email Attachments with Excel
    By foss0024 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2021, 08:54 PM
  2. move Excel attachments in email to a folder
    By Goodstart14 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2014, 09:56 AM
  3. [SOLVED] How to send an email from excel with two unique attachments
    By cyberelf77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2013, 09:51 AM
  4. Sending Email with Multiple Attachments from Excel
    By Lisa4legin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-29-2013, 03:24 PM
  5. Replies: 0
    Last Post: 02-21-2013, 04:46 AM
  6. Email merging Excel attachments
    By nc in forum Excel General
    Replies: 0
    Last Post: 04-13-2005, 05:06 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