Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to set the language in form fields?

41 views
Skip to first unread message

Cooz

unread,
Sep 8, 2009, 10:20:02 AM9/8/09
to
Hi everyone,

I have a Dutch version of Word 2003, and I work with Dutch texts in Dutch
documents, in which the language is set to Dutch.

I insert a text form field with the type set to Date and the Date format to
"d MMMM", protect the form and type 6-6 in the field. I press the tab key.
The field result is "6 June".

It's English!

What can I possibly do to retrieve Dutch dates?

Thank you,
Cooz

Graham Mayor

unread,
Sep 8, 2009, 10:45:14 AM9/8/09
to

With the form unprotected, format the form field with the Dutch Language -
Tools > Language. Then update the field. The display will adopt the settings
from the Windows Regional settings Long Date format for that language.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org

Peter Jamieson

unread,
Sep 8, 2009, 10:56:18 AM9/8/09
to
I had a look at this a few months ago.At that time I thought that
a. the language used to display these dates is the "Primary Editing
language" that is set in the Office Language Settings.
b. the language settings in Control Panel regional options, the
language of the paragraph/style, and the language currently used for
input do not seem to affect it at all.

(With ordinary fields (e.g. REF fields) date formatting does take
account of the language of the text, but attempting to apply a date
format switch within the FORMTEXT field makes no difference.)

So it is worth checking that. However, since it sounds as if your entire
system is set up for Dutch use, the "Primary Editing language" will also
be Dutch and my hypothesis will be wrong. If so, I'm not sure I will be
able to find a solution, but let me know. I may only have looked at Word
2007.

Groetjes,
Peter Jamieson

http://tips.pjmsn.me.uk
Visit Londinium at http://www.ralphwatson.tv

Cooz

unread,
Sep 24, 2009, 4:13:02 AM9/24/09
to
Hi Graham,

It's been a while - busy me.

Yep, that is the obvious solution, but it doesn't seem to work. When I
applied your suggestion, I found out that the form fields already were
formatted as Dutch. I updated them, and it doesn't make any difference. The
Windows Regional settings are correct, for example "donderdag 24 september
2009" for today.

However, I just tested your suggestion on my own laptop - and not on a
machine of the company that I'm creating templates for - and it worked fine.
Can this company have forced any policy or setting that makes my form fields
display English dates? Any suggestions?

Thank you, once more,

Cooz

Cooz

unread,
Sep 24, 2009, 4:41:02 AM9/24/09
to
Hi Peter,

I take it that with "Primary Editing language" you mean the "language that
defines the default behavior in Microsoft Office applications" (Start | All
Programs | Microsoft Office > Microsoft Office Tools > Microsoft Office 2003
Language Settings | tab "Enabled Languages"). That's indeed the one that
spoils the form field behavior.

Whenever I set this option to English, date format fields in Word spit out
the English format, no matter what else is defined language-wise in your Word
documents. Unfortunately the company that I work for doesn't make this option
available to its users - but my laptop does. I will have to find some IT boss
over here that can access this setting - and change it.

Thank you,

Cooz

Graham Mayor

unread,
Sep 24, 2009, 5:05:21 AM9/24/09
to
If you can use macros with your form (I saw your reply to Peter) there is a
workaround that I posted in another forum yesterday that you can apply:

In the following example, the date field is Text1 and the default format is
configured as "d MMMM yyyy" or "dddd, d MMMM yyyy" in the field properties.
The two macros are run on exit and entry to the field as their names imply.
The entry macro clears any date text from the field and prompts for the date
in the format "DD/MM/YY". If the date is entered in the field in this
format, the exit macro formats the field in the indicated language in the
format selected in the field properties. I have inserted both Dutch (active)
and Greek (inactive) to demonstrate that it does in fact work. The entry
macro is not essential as long as you remember to clear the field and type
the date in the format DD/MM/YY before tabbing out of the field.

Sub DateOnExit()
With ActiveDocument.FormFields("text1")
.Range.LanguageID = wdDutch
'.Range.LanguageID = wdGreek
.Result = .Result
End With
End Sub

Sub DateOnEntry()
ActiveDocument.FormFields("text1").Result = ""
MsgBox "Enter date in the format 'DD/MM/YY'"
End Sub

Cooz

unread,
Sep 24, 2009, 6:13:02 AM9/24/09
to
Hi Graham,

In fact I do use macros with the form. Company policy is that the resulting
document must be available to the user in its entirety, so the macro in the
last form field that the user exits replaces the form fields with their
values and removes the protection.

Since the date format is always "d MMMM yyyy", I have added code that
replaces any English months with their Dutch translations, which yields the
desired result. It's another workaround.

Thank you for your cooperation,

Cooz

Peter Jamieson

unread,
Sep 24, 2009, 6:29:38 AM9/24/09
to
Looking a bit further, the Primary Editing Language appears to be the
one defined in

Application.LanguageSettings.LanguageID(msoLanguageIDInstall)
but this is a read-only value.

If you can modify the registry, you can certainly set the value in the
following item - this is for Word 2007, for the current user

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\LanguageResources\InstallLanguage

and ensure that there is an entry to the list in

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\LanguageResources\EnabledLanguages

e.g. for Dutch (Netherlands), use 1043 decimal. (I think Word will
automatically add the Primary Editing Language to that list but haven't
looked that hard).

That said,
a. it's quite possible you can't access the registry either on the Pc
where you do not have the Office Language settings tool
b. I don't know if you can set the language for all users on the
system via the LOCAL_MACHINE registry hive, or whether you would even
want to.

Cooz

unread,
Sep 24, 2009, 7:10:01 AM9/24/09
to

Hi Peter,

It's a bit of a shame that you have to dig this deep to set the language on
a form field. I'm applying a workaround that replaces English months with
their Dutch translations when the user exits the last form field. This is
somewhat easier, and it works - it doesn't solve the problem, though.

Thank you for cooperating,

Cooz

0 new messages