Non English contact field names in non English Office causing VB problem

  • Thread starter Thread starter -mhd
  • Start date Start date
M

-mhd

The German version of Outlook uses German language internal field
names.

[German]
Telefon Assistent
Telefon geschäftlich
Telefon geschäftlich 2

instead of

[English]
AssistantTelephoneNumber
BusinessTelephoneNumber
Business2TelephoneNumber

The following statement raises an error because of the space in the
field name.
oContact.Telefon geschäftlich = PhoneNum

whereas
oContact.BusinessTelephoneNumber = PhoneNum naturally works just fine.

How can I get around assigning contact fields with spaces in the name?

Thanks,
-mhd
 
Michael Bauer said:
the Object Model doesn´t know any other than english names.

That's not the experience I had with my German users because when I
switched to using the German field names in a find operation
"ofolder.Items.Find(sFilter)" it quit crashing with an error.

This would make sense because sfilter is a string and allows spaces
but VB objects to the space when used in this manner...
oContact.Telefon geschäftlich = PhoneNum

When I originally Googled on this problem I found out that the
internal names are German and everything worked fine in searches.

Thanks,
-mhd
 
I´m not sure whether I understand you or not.Regarding to the sample of
your first post: all property names, available via the class names, are
in english only.

If you want to use them in Find or Restrict, then include the strings in
Chr(34), please.
 
Michael Bauer said:
I´m not sure whether I understand you or not.Regarding to the sample of
your first post: all property names, available via the class names, are
in english only.

If you want to use them in Find or Restrict, then include the strings in
Chr(34), please.

Hi Michael,

This works
sFilter = "[Telefon geschäftlich] = '+49 (179) 5192032'"
ofolder.Items.Find(sFilter)


This doesn't
oContact.Telefon geschäftlich = PhoneNum

Are you saying that in the second example I must revert back to
English names?

-mhd
 
Yes. All available properties you can see in the Object Browser. There
is nothing else for your second example.

--
Viele Grüße
Michael Bauer - MVP Outlook


-mhd said:
Michael Bauer said:
I´m not sure whether I understand you or not.Regarding to the sample of
your first post: all property names, available via the class names, are
in english only.

If you want to use them in Find or Restrict, then include the strings in
Chr(34), please.

Hi Michael,

This works
sFilter = "[Telefon geschäftlich] = '+49 (179) 5192032'"
ofolder.Items.Find(sFilter)


This doesn't
oContact.Telefon geschäftlich = PhoneNum

Are you saying that in the second example I must revert back to
English names?

-mhd
 
Back
Top