+ Reply to Thread
Results 1 to 3 of 3

Multiple instances of OutMail in same VBA?

  1. #1
    Forum Contributor
    Join Date
    05-23-2007
    Posts
    126

    Multiple instances of OutMail in same VBA?

    Within the same VBA (excel) module, I have two different places where I send a workbook (different workbooks each time) to different recipients. The first instance runs fine but the second does not. There is no error and the code finishes, but the email is not sent. Thanks for any help identifying which mistake I've made this time... I'm guessing maybe I can't use OutMail more than once??

    First instance:
    Please Login or Register  to view this content.
    Second instance:
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Multiple instances of OutMail in same VBA?

    You are not seeing an error because of the On Error Resume Next lines. That is considered not good coding practice.

    If you sent the first OutMail, create a second Mail item using the Set Outmail line again...

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 09-16-2020 at 06:50 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-23-2007
    Posts
    126

    Re: Multiple instances of OutMail in same VBA?

    Perfect, thank you! Will stop using those On Error lines...

+ 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. Reading User Input in Excel Outmail Application
    By sgb1223 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2014, 05:03 PM
  2. Set OutMail =
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2013, 10:22 AM
  3. [SOLVED] Complex VLOOKUP, multiple instances vertical, return subsequent instances horizontally
    By Miles_2804 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-12-2013, 11:54 AM
  4. VBS/OutMail script and macro sends email message twice
    By Andrew_Harris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2013, 08:57 PM
  5. Inputting data from multiple instances from multiple users into a main Excel Workbook
    By smooth_beaker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-04-2013, 12:18 AM
  6. Run-time error '91' variable not set with OutMail
    By zhammer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2012, 10:15 AM
  7. Outmail Funcion - Composing Body
    By greekboyuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2011, 07:27 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