+ Reply to Thread
Results 1 to 5 of 5

Single Macro to activate multiple email send

  1. #1
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    Single Macro to activate multiple email send

    Hi Folks,

    I have six macros (Region1, Region2, Region3, Region4, Region5 and Region6). Each of those macro, extract Region specific sheets from a workbook and emails them to different people.

    Each of the macros 'display' the emails before they send it. (i.e. ".display" rather than ".send"). This enables me to 'common sense' check the email prior to sending.

    I'm trying to put together a macro that will run each of the macros above one after the other. I've tried setting up a macro to simply call each macro in turn, however, it seems that the .display after running "Sub Region1()" prevents it from then activated "Sub Region2()"

    Ultimately I'd end up with 6 emails on display ready for me to hit the "Send" button in Outlook.

    Does anyone have any ideas on how I could overcome this please?

    Many thanks,

    MagicMan

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,988

    Re: Single Macro to activate multiple email send

    I'm surprised that the .Display is causing a pause/delay as it is in Outlook at that point. I don't see why Excel would be waiting for a response.

    It would be helpful to see your code and, ideally, a sample workbook.



    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    Re: Single Macro to activate multiple email send

    Hi Trevor,

    I'll happily post the code (i'll reduce it down to three as once I've grasped the principle with 3, doing it with 6 is simple logic

    Unfortunately I can't post the workbook as it contains thousands of names. I'll leave the code here for now and see if I can mock up a testing workbook (even if it's full of rubbish). Mocked workbook now uploaded (don't worry about the content). Pressing the Region buttons individually should work it's the "Send All Regions" macro that I want to get to work.

    Individual Codes for Regions 1, 2 and 3 (They're basically the same code repeated)
    Please Login or Register  to view this content.
    I tried this to activate each macro one after the other.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by MagicMan; 11-04-2019 at 08:39 AM.

  4. #4
    Forum Contributor
    Join Date
    03-08-2011
    Location
    London
    MS-Off Ver
    Work Office 365 Home 2019
    Posts
    428

    Re: Single Macro to activate multiple email send

    Cracked it!

    It would appear that the area of code highlighted in red bold was the culprit
    Please Login or Register  to view this content.
    By commenting it out, it stopped the issues I was having

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,988

    Re: Single Macro to activate multiple email send

    Glad you've resolved your problem. Can't quite see how that makes a difference but, if it works, it work



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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 With PDF Attachment Macro to Multiple Recipients
    By Hoover5896 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2018, 10:34 PM
  2. Send a single email to multiple contacts using a loop
    By bn06a2b in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2014, 07:48 AM
  3. [SOLVED] Need help in editing the current Macro to send email with multiple attachments frm Outlook
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2014, 11:25 AM
  4. Macro in excel for mac 2008 to send email to multiple users
    By vinay3744 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2013, 04:30 PM
  5. Macro to send email with multiple attachment
    By excelcheck123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 05:00 PM
  6. Macro, Send to Multiple email, embedded file, title from cells, help
    By vmasia in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-22-2012, 02:33 PM
  7. Macro date activate to send email
    By champs in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2009, 05:40 AM

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