Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    SendObject failing (2000 SR1)

    I am writing a little Access application to generate and email three reports from Outlook (also 2000 SR1). It was a bit of a rush job so it doesn't involve any VBA, just two ODBC linked files, one query, three reports that use a filter, three SendObject macros (one for each report), and one macro to control the others.

    When I would run the main macro it would call the first one, display the usual message box about 'Outputting... to a mail message', and then nothing. It would not create the email message, and it would not give any error message saying something went wrong. The next time I would try to run any of the macros Access wouldn't even attempt to send the object. If I closed the database and reopened it things wouldn't be much better. If I closed Access completely the next try of the main macro would generate one email from the first sub-macro, and nothing from the rest.

    I've got other multi-emailing databases set up, and all but one of them work right -- the last has the same problem as above, but it's been a low priority to fix. In fact, it was working proplerly and then one day just decided to go funny and would send one report out and fail without notice on the second.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SendObject failing (2000 SR1)

    Can you open one of the reports in preview mode?
    If yes, can you send it interactively by selecting File | Send To | Mail Recipient (As Attachment)...? (specify yourself as recipient)
    If yes, can you repeat this process?

    (If you want to troubleshoot this, I would recommend you to convert the macros to VBA (File | Save As..., As Module). For debugging, do NOT add error handling.)

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    Before I moved the file from my computer to the one it would be working from, I was able to test it successfully; after the failure I came back to my computer and ran the whole process automatically without any problems.

    When the first main macro failed (containing only the three report-emailing runmacro commands and a quit command) I modified them to first open the report, run the sendobject command, and then close the report. When run automatically, the reports would open and close, but with no action taking place in between.

    I can try converting to VBA, but that can't be a permanent change. The macro's graphical interface makes it easy to make changes to the parameters, and there's no one else available familiar enough with VBA to go into the code to make any changes that might become necessary.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SendObject failing (2000 SR1)

    You didn't mention that the problem occurs on one PC but not on another. Is there a difference in setup? Do both PC's use the same mail program, same version?

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    This problem first occurred on my main computer; Access 2000 SR1 and Outlook 2000 SP3, both fully patched and updated. The computer I was going to set it up on is Access 2000 SR1 and Outlook 2000 SR1a.

    I just retested the macros after converting them to code and the tests ran without a hitch, on both computers. Is VBA more reliable than using the macros?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SendObject failing (2000 SR1)

    In principle, macros and code should act the same. I find code much easier to maintain. Just <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    <hr>Access 2000 SR1 and Outlook 2000 SP3, both fully patched and updated<hr>
    Fully patched and updated would mean you have Access SP-3 and Outlook SP-3

    See Issues fixed in Access 2000 by Office 2000 Service Pack 3
    and SendObject method fails in Access 2000
    Francois

  8. #8
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    Thanks for confirming that I'm not seeing things; the second link exactly describes the problem I am having. It doesn't explain why, on my own computer, I have one that suffers from this problem yet others that have multiple SendObject commands do work. Perhaps it is the structure of the macro? In the one that fails, the SendObject commands are run back to back, but the ones that work generally have intervening processes running: action query, SendObject, more action queries, another SendObject, and so on. The message length is not an issue, since they are along the lines of "Attached please find your weekly report, please call if you have any problems.", well below the error-causing threshhold.

    Is this still an issue with later versions of Access? The upgrade cost is a factor to consider, but when function and reliability become an issue then the cost argument can easily be overcome.

  9. #9
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    Why don't you install SP-3 ? The first link I provide in my previous post is the description of the problems solved by SP-3.
    You can download the SP-3 at Description of the Office 2000 Service Pack 3 (SP3) or you can use the Office Update site at Microsoft Office Downloads Home Page
    Francois

  10. #10
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    I just checked, and my main computer is at SP3 - yet still subject to the problem.

  11. #11
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject failing (2000 SR1)

    I have no idea if an upgrade will solve the problem as don't have 2002 and rarely use 2003.
    If you post the db, I can test it on 2000 and 2003, but will this be a prove that it will work on your pc with 2003 ?
    Francois

Posting Permissions

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