• ‘SendMail’ failed (Excel97)

    Author
    Topic
    #388928

    My Excel97 spreadsheet uses SendMail attached to a macro to mail itself back to an admin office at month end using Outlook Express
    On some PC this works fine but on others I get the error message
    “Method ‘SendMail’ of object ‘_workbook’ failed” – err.number 1004
    The pc’s are mix of Win98/95 but all are running OE6 on Win98 and OE5.5 on Win95. Anyone have an idea why I’m getting the error and what to do about it please

    Viewing 7 reply threads
    Author
    Replies
    • #684827

      Does it work on the problem PC’s if you make sure that Outlook Express is active before executing the Excel macro?
      Are you sure that Outlook Express is the default mail program on those PC’s?

    • #684873

      Since the OP states that the systems that show the fault have Outlook Expres, I think the article you refer to is not relevant.

      I think Hans is right on the money that OE might NOT be the default mail system for those machines.

    • #684889

      I can confirm that Outlook Express is the default mail program – on most of the pc’s in the company Outlook is not installed and it doesn’t seem to make any difference whether OE is running in the background or not

    • #684891

      I’ve just noticed that the send-to option has disappeared from the File menu
      I tried to add a ‘mailto’ button th the toolbar and it immediately greyed out as if unavailable

      • #685245

        In the Immediates window on some of the problem machines, see if:

        ?Application.MailSystem = xlMAPI

        returns True

    • #684943

      Cowboy,

      The link you posted if for Office 98. That’s the Mac version, so it doesn’t apply to the way sendmail works on PCs.

    • #685181

      How about if you put an erro trap in the macro so that if the error occured the following would run.

      Workbooks(“BOOK1.XLS”).HasRoutingSlip = True
      With Workbooks(“BOOK1.XLS”).RoutingSlip
      .Delivery = xlAllAtOnce
      .Recipients = Array(“bob@abc.com”, _
      “phil@xyz.com”, “me@work.com”)
      .Subject = “Here is BOOK1.XLS”
      .Message = “Here is the workbook. What do you think?”
      End With
      Workbooks(“BOOK1.XLS”).Route

      Good Luck

    • #685396

      No apologies needed, but accepted anyway smile.

      Of course anyone answering here is trying to help. I just wanted to point out your link was not entirely to the point (even though it seems the only one in the KB to address the error message).

    • #685606

      I think I may have cracked it! Knowledge base article Q190719 – WD97: No Send To Mail Recipient with Outlook Express and Windows 98 seems to answer the problem
      Efectively I have re-installed Windows Messaging on two of the recalcitrant PC’s and the SendMail option has returned with full functionality restored to my Excel VBA
      I guess it was never installed on one PC but the other was working, then lost the functionality – the only changes that I can think have occurred is an upgrade to IE6 – maybe that disabled something as part of the Security Upgrade. Thanks anyway to all who replied – nice to know there is someone there when you need help

    Viewing 7 reply threads
    Reply To: ‘SendMail’ failed (Excel97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: