+ Reply to Thread
Results 1 to 8 of 8

Outlook Email from Excel

  1. #1
    Registered User
    Join Date
    11-09-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    59

    Outlook Email from Excel

    Hi,
    I have a few macros that spit out emails in Outlook. In the past, they have worked perfectly. However, at my office, we recently switched to a new domain server. When I switched over, I dropped the personal.xlsb file in the XLSTART folder in my new login. Now, when I run these macros, they work, however, they always leave the body of the email blank. (I have a message that is hard coded) Everything else works. (To:, Subject, even attachments)

    The macros still work on my old domain log in, oddly enough. Has anyone experienced anything like this?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2405
    Posts
    25,004

    Re: Outlook Email from Excel

    I'm unclear as to what changed. You changed your Exchange server? SMTP server? DNS host server?

    I have not experienced this but if you post all the code related to sending the email perhaps we can sort it out. Use Code tags or attach an Excel file.

    I cannot think of any scenario where you can set the recipients, subject and attachments, but not the body. But the code may give us a clue.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-09-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    59

    Re: Outlook Email from Excel

    Hi,
    Technically, I was on a local non-domain profile, and now I'm on Azure AD. The code is below. I redacted a good bit. You will see the word REDACTED where that has been done. The first half or so of the code is formatting the spreadsheet. The emailing follows that.

    Please Login or Register  to view this content.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2405
    Posts
    25,004

    Re: Outlook Email from Excel

    I am still unsure how it's possible that everything works except the body being blank, but the first and easiest thing I would try is to change htmlBody to Body to see if that makes a difference.

  5. #5
    Registered User
    Join Date
    11-09-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    59

    Re: Outlook Email from Excel

    Hi, I have changed it to .body, with no luck. If this helps, I'm on windows 11, with office 365. The macro is stored in my personal.xlsb workbook on my C drive. Also, oddly enough, when I step into the macro, and manually run it, using F8, it works.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2405
    Posts
    25,004

    Re: Outlook Email from Excel

    Getting different results when running a Sub vs. stepping through it with F8 suggest a corruption in the file or an Excel bug. You might try copying the code and sheet data to a clean file (not sure how much work that will be for you).

  7. #7
    Registered User
    Join Date
    11-09-2018
    Location
    USA
    MS-Off Ver
    365
    Posts
    59

    Re: Outlook Email from Excel

    Hi, it appears the issue has been solved. I tried what you suggested, with no luck.

    Then, I changed .display to .send, and it worked. However, I really did not want the email to automatically send. So, I found a suggestion to move .display to the beginning of the email creation. That did it. It doesn't make much sense to me, but it worked.

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2405
    Posts
    25,004

    Re: Outlook Email from Excel

    Makes no sense to me either. Thanks for sharing your solution.

+ 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. sending an email in outlook from a list of email address in excel
    By lydiat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-28-2021, 03:33 AM
  2. Bulk Email and Individual email from Excel File to Outlook
    By vikas_newports in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-27-2021, 08:55 AM
  3. Replies: 0
    Last Post: 05-28-2018, 09:53 AM
  4. vba pull data from outlook body of email through email or subject of mail into excel
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 04:37 AM
  5. export outlook 2007 email into excel with subject and body of email
    By akulka58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 02:37 PM
  6. How to parse data in Outlook email using HTML version of email back to excel
    By bnasty in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 10-31-2012, 02:54 PM
  7. Replies: 2
    Last Post: 08-01-2012, 02:47 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