Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2002
    Location
    Melbourne, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checking against 'Nothing' return (Outlook 2000)

    Folks,

    I'm trying to loop through the MailItems in the Outlook 2000 Inbox. The Help says that the GetNext method returns "Nothing" when I run out. However, I can't seem to test against this return value.. I keep getting an "Invalid use of Object" error.

    What's the correct way to test for a failed return from a collection GetNext call?

    many thanks,

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking against 'Nothing' return (Outlook 2000)

    I'm not an Outlook expert, but n Excel it would be:

    <pre> If Object Is Nothing Then
    </pre>

    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Apr 2002
    Location
    Melbourne, Australia
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking against 'Nothing' return (Outlook 2000)

    Um... <sheepish grin>....thanks. Now I vaguely DO remember something like that from the last time I tried this sort of thing (ie. years ago). And, wouldn't you know it, when I looked it up in the VBA book that I had at home (and which I'd clean forgot about!), it was there. <sigh>.

Posting Permissions

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