+ Reply to Thread
Results 1 to 12 of 12

Send workbook via email to multiple recipients

  1. #1
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Send workbook via email to multiple recipients

    I am using the following code to try and send a workbook via attachment to multiple email recipients however it will not work. If I only include one recipient then the code runs fine however it crashes when there is more than one.

    I get runtime error '1004': Unknown recipient name found in recipient list. Use a valid name and try again.

    Is anyone able to help me?

    Sub Mail_Workbook_1()
    Dim myFile As String
    Dim myMsg As String
    Dim myEmail As String 'MsgBox ActiveWorkbook.Name
    myFile = ActiveWorkbook.Name
    myMsg = "Submitted sheet"
    myEmail = "[email protected];[email protected]"
    Application.Workbooks(myFile).SendMail myEmail, myMsg, False
    End Sub

  2. #2
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    Have you looked here?

    http://www.rondebruin.nl/win/s1/outlook/amail1.htm

  3. #3
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    From what i can gather, this should work but it will send the latest saved version of the workbook.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Send workbook via email to multiple recipients

    The emails now work but the workbooks attached to the emails are blank! Does the user need to save the workbook before they submit the workbook?

  5. #5
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    Yes, the user has to save the workbook at least once.

  6. #6
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Send workbook via email to multiple recipients

    Brill. It works great now!
    What I would like now is for a confirmation message to pop up after the user clicks submit (to stop me receiving 3 emails all with the same workbook)! I'm new to all this so any help is gratefully received!

  7. #7
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    Sorry but I'm not sure what you mean. What do you want the pop up to display and what do you want to trigger it?

  8. #8
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Send workbook via email to multiple recipients

    Sorry, not making myself clear.
    Once the user clicks on the submit button, an email will send the workbook through. But as there is no message the user is sending it 3 times as they don't know if it's sent! I'd like a message/comment to display after they click on the "submit" to say something like "your workbook has been sent".
    Many Thanks for this

  9. #9
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    Do the emails not display on your screen prior to sending them so that you actually click send?

    Try
    Please Login or Register  to view this content.
    Last edited by badlydrunkboy; 01-15-2014 at 07:07 AM.

  10. #10
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Send workbook via email to multiple recipients

    Thanks for this. I will try the code and hopefully it will all work. I'll let you know after I've got some users to test it.
    Many thanks for all your help

  11. #11
    Registered User
    Join Date
    01-14-2014
    Location
    North Somerset
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Send workbook via email to multiple recipients

    Great! It works fine now. Thanks for all your help.

  12. #12
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Send workbook via email to multiple recipients

    You're welcome. Nice to be able to help someone after all the help i've received/am still receiving on here.

    Edit: you'll want to set the thread to [SOLVED] using the thread tools option if it's fixed your problem or you'll get told off
    Last edited by badlydrunkboy; 01-16-2014 at 11:05 AM.

+ 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. [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
  2. send email from excel to multiple recipients
    By hariexcel1987 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 01-13-2013, 01:41 PM
  3. Use an array in excel 2007 to send email via lotus notes to multiple recipients
    By tknox827 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2012, 05:54 PM
  4. Send email to multiple recipients
    By Court16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2009, 05:20 PM
  5. Send workbook via email to multiple recipients
    By lethal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2008, 06:58 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