Using Restrict function in multiple languages

R

Ramesh

I have an Outlook addin. In one of the methods, I am using the Restrict
method to restrict the appointment items I am getting from a folder based on
the Category name. So the restrict condition goes like this "[Categories] =
'xxxxxx'". It works just fine. But the issue comes when this addin works in a
different language OS environment, for example, Korean. Apparently, the
property names are translated according to the language of the OS and hence
[Categories] may be something else in Korean. Is there a way to solve this
issue? How can I code a restrict condition that will work in multiple
languages? Is there a way to retrieve the property name and then use it to
build the condition? I am giving [Categories] as an example, but I am also
using different properties in the condition. Any help would be greatly
appreciated. Thanks in advance.

(I already posted this in the Office Developer-Addin forum. No one has
responded yet. My programming language is C++, but I don't think it matters
for this issue)
 
S

Sue Mosher [MVP-Outlook]

You might want to use AdvancedSearch instead of Restrict, since AdvancedSearch uses schema names instead of localized field names.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
R

Ramesh

Hi Sue,

Thanks for the reply. I will look into it. But if I remember correctly,
AdvancedSearch is available only in certain versions of Outlook (2003 I
believe). I want a solution that would work for Outlook 2000 also.

Thanks

Sue Mosher said:
You might want to use AdvancedSearch instead of Restrict, since AdvancedSearch uses schema names instead of localized field names.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ramesh said:
I have an Outlook addin. In one of the methods, I am using the Restrict
method to restrict the appointment items I am getting from a folder based on
the Category name. So the restrict condition goes like this "[Categories] =
'xxxxxx'". It works just fine. But the issue comes when this addin works in a
different language OS environment, for example, Korean. Apparently, the
property names are translated according to the language of the OS and hence
[Categories] may be something else in Korean. Is there a way to solve this
issue? How can I code a restrict condition that will work in multiple
languages? Is there a way to retrieve the property name and then use it to
build the condition? I am giving [Categories] as an example, but I am also
using different properties in the condition. Any help would be greatly
appreciated. Thanks in advance.

(I already posted this in the Office Developer-Addin forum. No one has
responded yet. My programming language is C++, but I don't think it matters
for this issue)
 
M

Michael Bauer

Am Tue, 28 Feb 2006 08:15:56 -0500 schrieb Sue Mosher [MVP-Outlook]:

I wonder why there´s a problem. For me, on a German system, they work both
the English and the German names.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

You might want to use AdvancedSearch instead of Restrict, since
AdvancedSearch uses schema names instead of localized field names.
 
S

Sue Mosher [MVP-Outlook]

That's why we always suggest that people include their Outlook version(s) in their initial post.

You have no choice then but to research the localized field names. There's no central source of documentation for that.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ramesh said:
Hi Sue,

Thanks for the reply. I will look into it. But if I remember correctly,
AdvancedSearch is available only in certain versions of Outlook (2003 I
believe). I want a solution that would work for Outlook 2000 also.

Thanks

Sue Mosher said:
You might want to use AdvancedSearch instead of Restrict, since AdvancedSearch uses schema names instead of localized field names.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ramesh said:
I have an Outlook addin. In one of the methods, I am using the Restrict
method to restrict the appointment items I am getting from a folder based on
the Category name. So the restrict condition goes like this "[Categories] =
'xxxxxx'". It works just fine. But the issue comes when this addin works in a
different language OS environment, for example, Korean. Apparently, the
property names are translated according to the language of the OS and hence
[Categories] may be something else in Korean. Is there a way to solve this
issue? How can I code a restrict condition that will work in multiple
languages? Is there a way to retrieve the property name and then use it to
build the condition? I am giving [Categories] as an example, but I am also
using different properties in the condition. Any help would be greatly
appreciated. Thanks in advance.

(I already posted this in the Office Developer-Addin forum. No one has
responded yet. My programming language is C++, but I don't think it matters
for this issue)
 
R

Ramesh

Michael,

Would you mind posting the code snippet that you use to do the Restrict,
specifically restricting on Categories field?

Thanks for your help

K. Ramesh

Michael Bauer said:
Am Tue, 28 Feb 2006 08:15:56 -0500 schrieb Sue Mosher [MVP-Outlook]:

I wonder why there´s a problem. For me, on a German system, they work both
the English and the German names.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

You might want to use AdvancedSearch instead of Restrict, since
AdvancedSearch uses schema names instead of localized field names.
 
R

Ramesh

Hi Sue,

Thanks again for your reply and sorry for not including the version number
in my initial post. I can probably get the localized field names by
translating the field names, but there is no guarantee that it will match the
field names used by the Outlook API. The only way, that I know off, would be
to get the translated strings for the field names (as they are used in the
Outlook API) from Microsoft. But I am pretty sure someone must have faced
this problem already and must have found a solution.

If you know of a way or a workaround, please let me know. Thanks

K. Ramesh

Sue Mosher said:
That's why we always suggest that people include their Outlook version(s) in their initial post.

You have no choice then but to research the localized field names. There's no central source of documentation for that.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Ramesh said:
Hi Sue,

Thanks for the reply. I will look into it. But if I remember correctly,
AdvancedSearch is available only in certain versions of Outlook (2003 I
believe). I want a solution that would work for Outlook 2000 also.

Thanks

Sue Mosher said:
You might want to use AdvancedSearch instead of Restrict, since AdvancedSearch uses schema names instead of localized field names.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



I have an Outlook addin. In one of the methods, I am using the Restrict
method to restrict the appointment items I am getting from a folder based on
the Category name. So the restrict condition goes like this "[Categories] =
'xxxxxx'". It works just fine. But the issue comes when this addin works in a
different language OS environment, for example, Korean. Apparently, the
property names are translated according to the language of the OS and hence
[Categories] may be something else in Korean. Is there a way to solve this
issue? How can I code a restrict condition that will work in multiple
languages? Is there a way to retrieve the property name and then use it to
build the condition? I am giving [Categories] as an example, but I am also
using different properties in the condition. Any help would be greatly
appreciated. Thanks in advance.

(I already posted this in the Office Developer-Addin forum. No one has
responded yet. My programming language is C++, but I don't think it matters
for this issue)
 
M

Michael Bauer

Am Wed, 1 Mar 2006 19:43:26 -0800 schrieb Ramesh:

Interesting, first I wanted to anwser you this: For fields, like Categories,
it doesn´t work at all - neither in the localized version nor in English.
That is what you can read in the VBA help.

Then I tested and in fact: Restrict works on Categories if you use the
localized version. But it works only if you do know the exact string,
there´s no LIKE operator supported.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

Michael,

Would you mind posting the code snippet that you use to do the Restrict,
specifically restricting on Categories field?

Thanks for your help

K. Ramesh

Michael Bauer said:
Am Tue, 28 Feb 2006 08:15:56 -0500 schrieb Sue Mosher [MVP-Outlook]:

I wonder why there´s a problem. For me, on a German system, they work both
the English and the German names.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

You might want to use AdvancedSearch instead of Restrict, since
AdvancedSearch uses schema names instead of localized field names.
 
R

Ramesh

Hi Michael,

Thanks for your reply. But I beg to differ on your statement that "it
doesn't work at all". Restriction on Categories does work but there are
limitations. For my purpose it works well except for this localization issue
I am facing.

You state that "Restrict works on Categories if you use the
localized version". What do you mean? Did you have to use the translated
string for "Categories" in your Restrict condition? And if you did, and if it
worked for you, how did you find out about the exact translated string as
required by the Outlook API? Any help you provide would be of great help.
Thanks again for your help

K. Ramesh


Michael Bauer said:
Am Wed, 1 Mar 2006 19:43:26 -0800 schrieb Ramesh:

Interesting, first I wanted to anwser you this: For fields, like Categories,
it doesn´t work at all - neither in the localized version nor in English.
That is what you can read in the VBA help.

Then I tested and in fact: Restrict works on Categories if you use the
localized version. But it works only if you do know the exact string,
there´s no LIKE operator supported.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

Michael,

Would you mind posting the code snippet that you use to do the Restrict,
specifically restricting on Categories field?

Thanks for your help

K. Ramesh

Michael Bauer said:
Am Tue, 28 Feb 2006 08:15:56 -0500 schrieb Sue Mosher [MVP-Outlook]:

I wonder why there´s a problem. For me, on a German system, they work both
the English and the German names.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


You might want to use AdvancedSearch instead of Restrict, since
AdvancedSearch uses schema names instead of localized field names.
 
M

Michael Bauer

Am Thu, 2 Mar 2006 00:07:26 -0800 schrieb Ramesh:

... Restriction on Categories does work but there are
limitations. For my purpose it works well except for this localization issue
I am facing.

Hm, I intended to tell the same, didn´t I?

I´m a German, so translating "Categories" into my native language and using
that localized name in the Restrict condition isn´t very hard for me :)

As Sue told already, there´s no MS site translating any words for you.

If you need the Korean translation only then you could try it with babelfish
(http://babelfish.altavista.com/), any other dictionary or just ask friendly
a customer.

If you don´t know your customers respectively their languages then I
wouldn´t use the Restrict function, but search in a loop through the items.
 
R

Ramesh

Michael,

I was afraid you were going to give me that answer (and you did)! Anyway,
thanks for your help so far. If I come up with a workaround I will post it
here

K. Ramesh
 

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