Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SendObject fails silently (2003 SP 2)

    I have an application that is supposed to send a lot of reports using SendObject. Unfortunately when the code gets to the first SendObject line it just stops running - as if it had reached an End Function statement. There are no error messages and the application can be then used normally without restarting. It

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

    Re: SendObject fails silently (2003 SP 2)

    What happens if you change the last argument (EditMessage) from False to True?

    BTW1: You are trying to send in RTF format, not in snapshot format.
    BTW2: You don't happen to have a line On Error Resume Next somewhere before the SendObject line, do you?

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject fails silently (2003 SP 2)

    Yes, I noticed the RTF thing after I created the post.
    Problem now solved - it was nothing to do with SendObject, the report was making reference to a form control and the form control was empty. When I ran the report on its own I got a useful error message. Sorry to waste your time, but I wonder why there was no error message when SendObject tried to open the report?

    Ian

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

    Re: SendObject fails silently (2003 SP 2)

    Yes, I would expect an error message. That's why I asked whether you had an On Error Resume Next line - it suppresses all error messages.

  5. #5
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendObject fails silently (2003 SP 2)

    There is no error trapping used. I prefer this with work in progress as I can get straight to the problem , when it happens, by clicking the debug button. I think that was possibly the philosophy used by the writers of SendObject, except that they forgot to turn the error reporting functionality on after they had got it working.

Posting Permissions

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