Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / October 2009

Tip: Looking for answers? Try searching our database.

Restrict throwing 'Condition is not valid' error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark McGinty - 22 Oct 2009 22:55 GMT
Greets,

Out of the thousands of installed copies of our AddIn, exactly one throws an
error when we call Restrict aginsts the items collection of the default
contacts folder.  The filter expression is static, and is as folllows:

   [MessageClass] <> 'IPM.DistList'

Since it works as expected on every other machine, I can't imagine how this
might be a problem in my code, because I can't imagine how this condition
would be invalid in any folder.

The system is Outlook 2003, connected to Exchange, using CEM.  I asked the
user to perform an advanced search using the same criteria on this machine,
he said it returned the items he expected.

The user logged-into Exchange from another machine, and our AddIn ran
against his contacts without errors.  The user said he forced the .OST to be
regenerated on the problem machine, he said it didn't change the problem.

Anyone ever seen this, or have an idea what might cause it?  I'm thinking
Outlook might need to be reinstalled, but I don't want to suggest that
frivolously.

TIA,
Mark
Sue Mosher [MVP] - 23 Oct 2009 00:19 GMT
Is there a possibility that this machine is set to use Outlook in a language
other than English?
Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

> Greets,
>
[quoted text clipped - 24 lines]
>
> .
Mark McGinty - 23 Oct 2009 08:45 GMT
> Is there a possibility that this machine is set to use Outlook in a
> language
> other than English?

Hi Sue,

Did I ever send you a WTG note about your book?  (You may recall helping me
a couple of years ago, and I bought a copy of your book to keep a clear
conscience.)  If not, nicely done, concise yet sufficiently detailed; a
useful reference without a doubt!  (My intentions are always golden when I
decide to send such notes; follow-through could use some work.) :-)

Anyways, I can't say no possibility but I think it unlikely, the PC is in
the US, in email replies from this box, the header that describes the
original email are generated in English, date format is US... make that
highly unlikely.

But for argument's sake, what if it is?  OOM property names aren't
language-specific, right?

Thanks,
Mark

> Sue Mosher, Outlook MVP
>   Author of Microsoft Outlook 2007 Programming:
[quoted text clipped - 34 lines]
>>
>> .
Karl Timmermans - 23 Oct 2009 04:04 GMT
What is the exact error that is being thrown? (We apply the exact same
filter in our products and have never run across this as an issue so curious
as to what the error is that you're running into)

For what it's worth given your description being that it works accessing
same account from a different machine which indicates that the folder
contents are valid - would try the following:
     #1) do a detect and repair on problem machine (but really don't see
how this would affect filtering on a single message class)
     #2) have the user connect to the account in "non-cached" mode to see
if the problem persists

Message classes are not language dependant so that wouldn't be the cause.

Karl
______________________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - Importer/DataPorter/Exporter/Toolkit
"Contact import/export/data management tools for Outlook '2000/2007"
http://www.contactgenie.com

> Greets,
>
[quoted text clipped - 23 lines]
> TIA,
> Mark
Mark McGinty - 23 Oct 2009 18:01 GMT
> What is the exact error that is being thrown? (We apply the exact same
> filter in our products and have never run across this as an issue so
> curious as to what the error is that you're running into)

The exact error is:

   Description: Condition is not valid.
   Number: -451805175

> For what it's worth given your description being that it works accessing
> same account from a different machine which indicates that the folder
> contents are valid - would try the following:
>      #1) do a detect and repair on problem machine (but really don't see
> how this would affect filtering on a single message class)

He did that on his own, no affect.

>      #2) have the user connect to the account in "non-cached" mode to see
> if the problem persists

Hmm... I've already scheduled him some more time on the proverbial
treadmill, I asked him to create another user login, connect Outlook to
Exchange, etc to see if the problem is machine wide or user profile
specific.  I'll add that to his exercises... but I hope that's not it, we
need CEM.

Mark

> Message classes are not language dependant so that wouldn't be the cause.
>
[quoted text clipped - 33 lines]
>> TIA,
>> Mark
Karl Timmermans - 23 Oct 2009 19:15 GMT
Given that the most salient item in this problem is that it occurs only on
one machine - logic dictates that the issue is configuration related so
having just stated the obvious.......if this scenario was reported to us,
the key things we'd be asking/looking at/for would be:

1) Did this ever work on this machine? If it did, what was installed between
the time it worked and the time it stopped?
2) What add-ins exist on this machine that don't exist on others - active or
not? Simply disabling an addin doesn't preclude potential issues that could
result simply from it (and any of its related components) being installed.
3) Even for same add-ins - are these all at the same version level?
4) What Outlook related 3rd party software is installed on this machine
versus the others (if any)? For that matter, what 3rd party stuff has been
installed previously that may have been uninstalled? (i.e. for the
possibility that something has replaced the mapi dlls with a customized
version)
5) Further to item#4 - are the mapi dlls the same version on all machines?

Some "shot in the dark" - background questions:

6) What are you using to filter - OOM? CDO? Redemption? That's a strange
error number that doesn't seem to show up anywhere.
7) Are there any PDLs in this account? If yes, can they be opened normally
via Outlook on the problem machine. If no, if one was created - does the
issue still exist?

Karl
______________________________________________________
Karl Timmermans - The Claxton Group
ContactGenie - Importer/DataPorter/Exporter/Toolkit
"Contact import/export/data management tools for Outlook '2000/2007"
http://www.contactgenie.com

>> What is the exact error that is being thrown? (We apply the exact same
>> filter in our products and have never run across this as an issue so
[quoted text clipped - 61 lines]
>>> TIA,
>>> Mark
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.