+ Reply to Thread
Results 1 to 17 of 17

Trying to send Email from Excel

  1. #1
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Trying to send Email from Excel

    I'm not sure if this should be in the Excel forum or Outlook forum, so forgive me...

    We have to send a daily report to our boss at work, containing today's sales, goals for tomorrow, etc. Designing that was the easy part.

    What I'm trying to do is -- with the click of one button or link, open up an Outlook email, address it to the boss, enter title, and then the body of the email would be the text from a range of cells.

    I'm able to do that, but when I hit "Send" I get "No valid email accounts are configured. Add an Account to send email."

    I'm confused, because when I click on "Account" on both Outlook and Excel, they are both the same. I am even logged into both at the same time. What could I possibly need to do?

    Thanks!

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,907

    Re: Trying to send Email from Excel

    The account that you use to run Office is different than an email account. But if you get an email created, it should use whatever is the default email address in Outlook. Can you show the code you use to create the email? If you have to hit send I assume you use .Display and not .Send. What email account shows when it's displayed?

    email.JPG
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    Actually, if there is a way to Send it automatically, that would be a plus, but the problem is there is NOTHING in the "From" field. There is a drop-down arrow like in your example, but when I hit it, there are no options. Just a blank box.

    But yet, from the email, if I click File >> Office Account, all of our information is in there.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,237

    Re: Trying to send Email from Excel


  5. #5
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,907

    Re: Trying to send Email from Excel

    Let me try this again:
    Quote Originally Posted by 6StringJazzer View Post
    Can you show the code you use to create the email?

  6. #6
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    I don't remember the first one I tried.

    The one I am currently trying is a Hyperlink: "mailto:EMAIL HERE?subject=SUBJECT HERE"

    I tried visiting Logit's suggestion above, and used the following code, but I get a "Compile Error: Sub or Function not defined on the .HTMLBody = RangetoHTML(rng) line

    Please Login or Register  to view this content.
    Last edited by CriticalMass048; 04-23-2021 at 09:00 AM.

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,237

    Re: Trying to send Email from Excel

    .
    When using the .HTMLBody = Rangeto HTML(rng) ... it also requires this FUNCTION to be pasted below the email macro :

    Please Login or Register  to view this content.
    There is nothing you should need to do but paste and go.

  8. #8
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,907

    Re: Trying to send Email from Excel

    Quote Originally Posted by CriticalMass048 View Post
    I tried visiting Logit's suggestion above, and used the following code
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  9. #9
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    Logit,

    Ok, thank you for pointing that out. I pasted it, and while I wish I could say I understood it, I can say it works.

    HOWEVER, the big elephant in the room is that the original problem I posted about still exists....

    The picture posted by 6StringJazzer is NOT like the one I have. I have always been able to generate some sort of email, but the problem is actually sending it. There is nothing in the "From:" field.

    Email fault.jpg
    Last edited by 6StringJazzer; 04-23-2021 at 09:45 AM.

  10. #10
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,237

    Re: Trying to send Email from Excel

    .
    The original question is Outlook does not recognize that you have an email account established.

    I can only presume you are an experienced MS Office user and Outlook is not a challenge for you.

    I too have experienced Outlook not recognizing a valid email account (in the past). There did not exist an easy answer for me. I simply had
    to repeatedly setting up an email account in Outlook until "it finally took". To this day I still don't know what the issue was.

    After your researching and using answers found on the Internet ... if things still don't work - I guess you could try deleting Office and re-installing.

  11. #11
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    This is a work computer, so I don't have that option available to me.

    When I click "Add Account", I enter the email and password for the account, but it just keeps searching and searching for "settings"...

    However, as I mentioned, from the email as I pictured above, if I click on File and go to Office Account, all of the credentials are there, so I don't know why it doesn't know the account to send it from. This is why I assumed it's a setting in Outlook rather than Excel.
    Last edited by CriticalMass048; 04-23-2021 at 12:26 PM.

  12. #12
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,237

    Re: Trying to send Email from Excel

    .
    Do you have an IT Dept ? If so, check with them.

    I am at a loss how to advise you. I am so sorry ...

  13. #13
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,907

    Re: Trying to send Email from Excel

    I have been focusing on your VBA but I am starting to think that you do not an have an email account configured in Outlook.

    When you open Outlook, and click on New Mail, do you get the same behavior? If you go to File, then click Account Settings, then click Account Settings (yes, again), do you see something like this? There needs to be at least one account set up that will have the checkmark:

    mail.jpg

  14. #14
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    6StringJazzer ,

    You have hit the nail on the head! Our is completely blank. We use web-based Outlook, so that explains why we've never noticed before.

    However, like I said already, any attempt to add an account results in "Searching for Settings", then notification that an Encrypted connection cannot be found, followed by the same results for an Unencrypted connection. I guess I'm just SOL, since i doubt our IT department will help.

  15. #15
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    Nobody with any ideas how to rectify this? Maybe find a work-around? Right now I'm just using an Excel macro to copy the desired cells, then manually open a new email, manually enter "To" field, and Ctrl-V to paste the copied cells.

  16. #16
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    17,907

    Re: Trying to send Email from Excel

    Here is an excellent article by Ron de Bruin that describes how to send email directly to the SMTP server without needing to go through the Outlook client. I mostly understand it but I've never done it, but feel free to post questions if you get stuck.

  17. #17
    Registered User
    Join Date
    01-12-2020
    Location
    Philadelphia, PA
    MS-Off Ver
    2016
    Posts
    41

    Re: Trying to send Email from Excel

    Yeah, I'm stuck, and I get the feeling it would be a lot of work. Like, I don't know whether or not I need to use the part about the ports and SMTP server, or even what I use as the SMTP server. Sigh.

+ 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. Excel to send email to two addresses in two cells? MSG box upon send?
    By sdyer02 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2016, 08:22 PM
  2. I send email using Lotus from Excel but how to send from Thunderbird?
    By EvelynLoh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2015, 11:31 PM
  3. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  4. How to send email from excel using VBA with Cell Range (Including Images) as Email Body
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2014, 05:06 AM
  5. Replies: 2
    Last Post: 02-14-2014, 12:03 AM
  6. Automatic send email (without even click send in mail software) with excel vba ??
    By alexnkc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2013, 08:31 PM
  7. Excel Email Macro VBA - How to send an email once all required fields have been fille
    By wallacm2009 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 10:51 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