Consulting

Results 1 to 4 of 4

Thread: Excel eMail sending failure in Windows 10

  1. #1
    VBAX Mentor
    Joined
    Jan 2008
    Posts
    384
    Location

    Excel eMail sending failure in Windows 10

    I have a vba macro that works correctly in Win 7 & Vista, but it fails to send the email in Windows 10.

    If I step through the macro, it fails at Line 81, Col 14 where it says

    .Send

    ITS THIS BIT:

    "This is a auto generated email, please do not reply."
             .AddAttachment "c:\Temp1\" & Sheets("Sheet1").Range("AX1").Text & " " & " A Closing Sheet" & ".xls"
            .Send

    Can anyone tell why this is now failing and if there's a usable workaround that may NOT involve using Outlook.
    Attached is the .xls workbook.
    Its saved like this as the same format across different versions of Excel to accommodate everyone.

    Thanks
    Attached Files Attached Files

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    .
    First step: make certain the path in your code actually exists on your computer. Is everything spelled correctly ?

    Second step, change this:

    "This is a auto generated email, please do not reply." 
    .AddAttachment "c:\Temp1\" & Sheets("Sheet1").Range("AX1").VALUE & " " & " A Closing Sheet" & ".xls"    '<<<--- Change Text to Value
    .Send
    Cell data is referred to as VALUE ... a TEXTBOX data is referred to as TEXT.

  3. #3
    VBAX Mentor
    Joined
    Jan 2008
    Posts
    384
    Location
    Thanks Logit:

    I restarted the Window 10 system and it just worked,no changes; however, none of the Windows 8.1 systems work.
    This code has been functioning as is for a couple of years. I'm Still stumped.

  4. #4
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    You are welcome.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •