+ Reply to Thread
Results 1 to 39 of 39

Send email from excel to outlook

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Send email from excel to outlook

    Have a code that does this but never sure if it's sent without going to outlook.Is there a way to have message box popup in excel that mail was sent in outlook.Sometime it seems like stuff get hung up in the outbox,so if it not sent a error message.Not sure any of this is possible,maybe some links to examples would be helpful.I can post what I'm using now if needed.

    Thanks for any suggestions.
    Last edited by zplugger; 08-27-2015 at 07:57 AM.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Hi zplugger,
    I've been trying to find a solution for you on this, but have come up empty handed. Couldn't even find anything on Ron de Bruin's website about sending a notification for sent, or not sent emails. May I suggest changing the .send to .display until a solution is found? This will allow you to preview the email first and then send it. I know this kind of defeats the purpose for auto sending emails, but, it might be a temporary or "band aid" fix for now.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Hey berlan,
    Thanks for the rep on this.

  4. #4
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks gmrevr1 for trying to find solution to this.Just seems like 2 office programs could talk back and forth to each other.Did try the display idea,after I push send the program closes.Have
    to open and make sure it not in outbox,wish I could have a cell on invoice to show sent or error in sending. Guess there is no good clear way to make this automatic.I will keep searching to a better mouse trap LOL.
    Z

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Do you mean outlook closes when you hit send? If so, what is the code that makes it close, maybe remove or comment it out? I use VBA to auto send emails through outlook and my outlook doesn't close until I close it.

  6. #6
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks again gmr4evr1 for the help,I need to find another example of sending email in excel.Need to see how another code runs this process,just need easy way
    to tell if sent.There has to be a better way then what I use.

    Z

  7. #7
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Z,
    Check out this link, it might be what you are looking for
    http://stackoverflow.com/questions/2...-sent-manually

  8. #8
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    I did check it out, very lost on this. Would all this code go in excel workbook?

    Please Login or Register  to view this content.

    would this part be adapted into my mail code now?

    Please Login or Register  to view this content.
    Looks like this is what I need if I can make it work
    Z

  9. #9
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    I'm afraid that this has gotten to where it is over my head now and I would have to play around with it a bit.. This is the only code I have found that seems like it would alert you when the email has been sent. I haven't been able to try it out yet to see how it works.

  10. #10
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    I know what you mean,will play around and see if I can make it work.Maybe we can get more help on this.

    Thanks z

  11. #11
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Send email from excel to outlook

    I found a link regarding checking if someone had press the send (below)
    do you know why the messages get caught up in your outbox?

    http://www.mrexcel.com/forum/excel-q...ml#post1605556

    does send recieve all force them to go?

    eg.
    Please Login or Register  to view this content.
    Last edited by scottiex; 08-18-2015 at 11:03 PM.

  12. #12
    Registered User
    Join Date
    08-15-2015
    Location
    Dallas
    MS-Off Ver
    2014
    Posts
    8

    Re: Send email from excel to outlook

    This may not be exactly what you are looking for, but I also do a :BCC to myself on emails that automatically send via outlook. This way I see the pop-up in the bottom right corner when the mail is sent.

  13. #13
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks for the ideas guys, still searching for a good method to tell if email was sent.I like the idea gmr4evr1 had but cant make it work. Not sure how to set it up and where the code goes.Not
    sure if anyone ever tried that code and got it to work?

    Z

  14. #14
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Send email from excel to outlook

    Wouldn't it be Outlook that tells you it was sent, how would excel know it was sent?
    Possibly BCC it to yourself, then you would get a copy of the e-mail.

    Edit: I see somebody else had the same idea.
    Last edited by davesexcel; 08-21-2015 at 06:45 AM.

  15. #15
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks davesexcel for the input,so I should find a something in outlook to send data to active excel sheet if possible?.Gmr4evr1 had nice code but not sure if it works.
    Z

  16. #16
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Send email from excel to outlook

    if the PostOut folder is empty all mails have been sent:

    Please Login or Register  to view this content.



  17. #17
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks snb for the suggestion,little slow here so please bear with me.Where would the code you posted go? and what would it do?

    Thanks z

  18. #18
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Send email from excel to outlook


  19. #19
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks for the link snb, went to site and I'm totally lost. Think I getting in way over my head on this request, was hoping for a simple solution. After reading the suggestion from GMR4EVR1 was
    thinking this would be easy.Done a lot of searching on this with no luck,maybe what I'm looking for is not possible.
    Z

  20. #20
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send email from excel to outlook

    Hi zplugger

    Post an image of what a typical Email looks like (jpg...NOT png). It seems to me we can query the Outlook Sent Folder to see if the Email we're looking for is in there.

    If it's there a field could be populated with "Confirmed" or such. I don't know what time this would take in terms of the execution of the Code.

    This is all "noodling"...just thoughts off the top of my head...may work...may not.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  21. #21
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks for the suggestion jaslake,I change my code so when excel sents the email it will open outlook and I can watch the outbox then close after it sends.This seems like the best way to
    see if it was sent. GMR4EVR1 code posted in early thread was what I was looking for but just seems impossible to get working.

    Z

  22. #22
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Howdy Z,
    I'm still planning on trying out that code myself to see how it works, but haven't had a chance to yet.

  23. #23
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Thanks, hope you have better luck them me. Problem having now is when I send email outlooks opens behind workbook,trying to get it to open on top of workbook when I send mail.

  24. #24
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Try using this, or modify to your code to bring outlook to the top..
    Please Login or Register  to view this content.
    Last edited by gmr4evr1; 08-22-2015 at 11:44 AM. Reason: Added info

  25. #25
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Here is what I have now,could not make other code work?
    Please Login or Register  to view this content.

  26. #26
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Comment out or delete this line
    Please Login or Register  to view this content.
    It is telling it to minimize outlook

    Or, comment out or delete the above and this line
    Please Login or Register  to view this content.
    and replace it with
    Please Login or Register  to view this content.
    Last edited by gmr4evr1; 08-22-2015 at 12:18 PM. Reason: added additional suggestion

  27. #27
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    getting runtime 91 error
    Please Login or Register  to view this content.

  28. #28
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Funny I can go to vba and change code and it works,save the workbook and reopen and outlook go to the back again?

  29. #29
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    If I take the vba project password off all works after save?

  30. #30
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    So, you want outlook to the front when you open the excel workbook then you have to place the code in the workbook section, below is the code..
    Please Login or Register  to view this content.
    Question, what is the Unload Me line for?

  31. #31
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Good question, not sure why I had unload me.What I have is this code on a userform commandbutton to send email.So the button opens outlook and runs the rest of code. Send twoday package is the code for getting right email address and attaching a pdf to email. Any ideas whe the vba password would cause outlook not to open on top of the workbook when button is pushed?. Code works perfect if no vba password is set,set a password and it does not work right?

  32. #32
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    Here is a sample of the problem, password is 1234. if no password outlook opens on top,if password outlook open behind workbook?
    Attached Files Attached Files
    Last edited by zplugger; 08-22-2015 at 01:34 PM.

  33. #33
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Do you mean the password to open the VBA project window? Because with or without the password, I tried the sample you attached, clicked the button, and outlook opened and stayed on top of all other windows until I minimized or closed it.
    I'm starting to think its not something with this code that is causing the problem, it's code somewhere else in the workbook.

  34. #34
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    yes vba project window,set password close and save workbook then reopen
    Last edited by zplugger; 08-22-2015 at 02:12 PM.

  35. #35
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Hmmm....I'm not having the same problem. I tried the way in my previous post, then just now I changed the password completely, saved the workbook, reopened it, clicked the button, and all worked just fine. Outlook stayed on top of all other windows until I minimized or closed it.

    Does it happen to you when you try running the last sample attachment you posted?

    Do you have a .Activate line somewhere else in your code? Other then the code in your sample workbook.
    Last edited by gmr4evr1; 08-22-2015 at 02:44 PM. Reason: Added another question...or 2

  36. #36
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    No, having the problem with the sample workbook.Must be something in my excel program after saving? Not sure what to do now.

  37. #37
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Send email from excel to outlook

    Yea, I think I'm at a loss on this one myself.

  38. #38
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook

    OMG this can make a old man cry,driving me nuts.Even tried the file on wife's computer and same problem,vbaproject password set and it opens behind workbook.Wonder if a reference is not set right? running office 2013 on my computer and she has office 2007. This is a simple code but can't get handle on problem. I can open the file 50 times with no project password set and runs perfect,add project password and it will not work right. Maybe someone has some more suggestions on this before I have no hair left.

    Thanks z
    Last edited by zplugger; 08-22-2015 at 03:45 PM.

  39. #39
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Send email from excel to outlook


+ 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 an Outlook email from Excel
    By maya2ph in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2015, 09:29 PM
  2. VBA to Send Email From Excel Using Outlook
    By jar002 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2014, 10:08 AM
  3. [SOLVED] Send email from Excel using Outlook
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-10-2013, 05:19 PM
  4. Excel to send email via Outlook (attachment)
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2012, 07:01 AM
  5. Send email from Excel to Outlook
    By shaukat in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2011, 04:46 PM
  6. Send an email with excel VBA through outlook
    By Alicita in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-10-2011, 05:03 PM
  7. VBA to send email from Excel through Outlook
    By diablodvs7 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2008, 10:34 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