Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Access cant handle Undeliverable (Access 2003 SP2)

    Or maybe I cant handle it.

    I have a database that attempts to read thru an Inbox and processes "Undeliverable" emails. However as soon as i read one the following command stops with a type error:

    Set oMessage = oFldr.Items.Item(iMailCtr)

    I cant work this out.
    Attached Files Attached Files

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

    Re: Access cant handle Undeliverable (Access 2003 SP2)

    I tested the code on my inbox and it ran without problems.
    Have you checked Tools | Refefences... for missing references?

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Access cant handle Undeliverable (Access 2003 SP2)

    Hi Pat

    I tested this as well, and my experience was the same as Hans.

    Funny...I normally don't use Outlook, but this revealed that a message that came in today had gone to Outlook instead of Thunderbird. I had opened Outlook today to test some other code.

    Can you get other Outlook automation to work?
    With my previous laptop I got a similar error with any code that tried to send email via Outlook. I could never fix it. I had to always test it with another machine.

    John
    Regards
    John



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

    Re: Access cant handle Undeliverable (Access 2003 SP2)

    O}h wait: the type mismatch error would occur if your inbox contains other types of items than e-mail messages. You could change the declaration of oMessage to

    Dim oMessage As Object

    and test as follows:

    Set oMessage = oFldr.Items.Item(iMailCtr)
    If oMessage.Class = olMail Then
    With oMessage
    ...
    End With
    End If

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Access cant handle Undeliverable (Access 2003 SP2)

    Funny about that, mine does too at home. It doesn't at work, i will check the version and references at work.

    Thanks Hans

Posting Permissions

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