Restrict or Find method with multi-languages

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].
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top