+ Reply to Thread
Results 1 to 3 of 3

Macro: Copy mail addresses from a filtered list to Outlook

  1. #1
    Registered User
    Join Date
    08-07-2015
    Location
    Trondheim, Norway
    MS-Off Ver
    365
    Posts
    20

    Macro: Copy mail addresses from a filtered list to Outlook

    Hi.

    Please be patient with the grammar

    I'm using Excel 2013/2016

    I have a spreadsheet with a list of contacts I would like to send email to.
    On Sheet "Unike brukere" in column D (D2: D1500) is the email address of the people I want to send email to.

    I have a simple macro that copies all the addresses and puts them in Outlook, the problem is that it does not work when the list is filtered. An email is created and all the e-mail addresses are copied. So the macro works perfectly when I want to send to everyone, but not when I only want to send to a small selection of contacts
    Anyone who has suggestions for what's wrong?



    Regards
    Trond F.

    ===============================

    Please Login or Register  to view this content.
    Last edited by Trond64; 03-18-2018 at 04:32 AM.

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Macro: Copy mail addresses from a filtered list to Outlook

    Forum rules require Code Tags around VBA code. Please click Edit Post, select the relevant text and click # on the Editing Toolbar. Thanks - Lee
    Please Login or Register  to view this content.
    RE: your problem: Are you saying that the entire list is added, regardless of filtering?
    Last edited by leelnich; 03-17-2018 at 01:51 PM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  3. #3
    Registered User
    Join Date
    08-07-2015
    Location
    Trondheim, Norway
    MS-Off Ver
    365
    Posts
    20

    Re: Macro: Copy mail addresses from a filtered list to Outlook

    Quote Originally Posted by leelnich View Post
    Forum rules require Code Tags around VBA code. Please click Edit Post, select the relevant text and click # on the Editing Toolbar. Thanks - Lee
    Please Login or Register  to view this content.
    RE: your problem: Are you saying that the entire list is added, regardless of filtering?
    Thank you for information about # - hope it's more readable now

    yes - the entire list is added even though eg 15 names are listed.


    Added 18.03-2018
    I found the solution - I was missing Sheets("").
    This line works : If Sheets("Unike brukere").Rows(cl.Row).EntireRow.Hidden = False Then
    Last edited by Trond64; 03-18-2018 at 04:57 AM. Reason: Solved

+ 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. Get mail addresses from outlook
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2017, 05:25 AM
  2. [SOLVED] How to add mail addresses, Subject and body from excel to outlook
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2016, 04:08 PM
  3. Replies: 3
    Last Post: 12-17-2015, 04:23 PM
  4. Opening e-mail addresses in a blank Outlook e-mail
    By Barking_Mad in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2010, 11:59 AM
  5. Send list of E-mail Addresses to Microsoft Outlook
    By RIFRAF in forum Excel General
    Replies: 2
    Last Post: 09-29-2009, 11:59 AM
  6. Replies: 4
    Last Post: 07-08-2008, 11:14 AM
  7. Exporting e-mail addresses to Outlook Express
    By wtm442 in forum Excel General
    Replies: 1
    Last Post: 12-18-2007, 04:43 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