T
Tony Gravagno
I have a macro that deletes mail if the subject equal to the word "hi"
or any other fixed string. If you've tried to create a rule for this
one you know you can find "with 'hi' in the subject" but not "with
subject = 'hi'".
I ran this macro on a test folder with a lot of recent spam that was
similarly not filtered from my other 50 rules. I found that if the
folder contained an e-mail which did not have a complete set of
headers, my macro wouldn't be executed after it hit that item, it
would stop with the error:
The operation failed. An object could not be found.
It would process some items but then fail, regardless of the sorted
order, and from then on it would fail whenever run, until that item
was removed. This tells me the process stops whenever it hit the item
based on internal hashed order, sorted order is not important.
I suspect other standard operations in Outlook will also fail if a
MailItem object is found to be incomplete or defective.
Summary:
1) If you see this error, look for an item with no header for Subject,
From, or maybe no Message-ID info. This isn't the same as a Subject
header that happens to be empty, I mean no header line.
2) Delete that mail item.
3) Re-try whatever function you were doing.
4) This is 100% reproducible in Outlook 2002, I'll verify it for 2003
soon.
Thanks.
Tony Gravagno
Nebula R&D
[email protected]
or any other fixed string. If you've tried to create a rule for this
one you know you can find "with 'hi' in the subject" but not "with
subject = 'hi'".
I ran this macro on a test folder with a lot of recent spam that was
similarly not filtered from my other 50 rules. I found that if the
folder contained an e-mail which did not have a complete set of
headers, my macro wouldn't be executed after it hit that item, it
would stop with the error:
The operation failed. An object could not be found.
It would process some items but then fail, regardless of the sorted
order, and from then on it would fail whenever run, until that item
was removed. This tells me the process stops whenever it hit the item
based on internal hashed order, sorted order is not important.
I suspect other standard operations in Outlook will also fail if a
MailItem object is found to be incomplete or defective.
Summary:
1) If you see this error, look for an item with no header for Subject,
From, or maybe no Message-ID info. This isn't the same as a Subject
header that happens to be empty, I mean no header line.
2) Delete that mail item.
3) Re-try whatever function you were doing.
4) This is 100% reproducible in Outlook 2002, I'll verify it for 2003
soon.
Thanks.
Tony Gravagno
Nebula R&D
[email protected]