Restrict or Find method with multi-languages

  • Thread starter Thread starter Hubert
  • Start date Start date
H

Hubert

Are the field names used with the Restrict/Find method
language-sensitive?

I have some code that uses the restrict method to find
specific contacts based on LastName, FirstName, MiddleName
or Company...

Set olkContacts = olkContactFolder.Items.Restrict
("[LastName] = '" & strFindText & "'")

This code works fine on my English system but not for my
German users (They get an error message 'Die
Eigenschaft "LastName" ist nicht bekannt'--which I think
translates to 'the property "LastName" is not known').

Is there anyway around this other than to first determine
the OS language and then generate the criteria for the
Restrict method in each language? [I may also need to do
this in a few other countries].
 
Yes, unfortunately, I think the built-in properties are localized for Find and Restrict, and no documentation is available on all the values. A workaround in Outlook 2002 or later might be to use AdvancedSearch instead.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top