Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
John Morris John Morris is offline
external usenet poster
 
Posts: 5
Default Lock language in FORMTEXT

Hello,

My client is an non-profit internation medical research company doing
business in English only. Investigators are required to complete Word
2003 forms which include a date in a text form field. When the forms
are returned, the date field is filled in whatever language the
investigator has set as their Word default. Could be Russian, Czech,
Spanish, French, and so on.

Is there any way to set or lock the language in a text field?

Selecting the form field, or the whole document, and setting the
language has no effect on the languge that shows up in the text field.

Sorry if this has been dealt with recently.

John Morris
  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Lock language in FORMTEXT

Hmmmm. There are several varieties of English with different date formats,
but assuming you can persuade users to run macros, it is possible to format
the date in the variety of English that you prefer. In the following
example, the date field is Text1 and the default format is configured as "d
MMMM yyyy" in the field properties. The two macros are run on exit and entry
to the fields 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 UK English (active) and Greek (inactive) to
demonstrate that it does in fact work.

Sub DateOnExit()
With ActiveDocument.FormFields("text1")
.Range.LanguageID = wdEnglishUK
'.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

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



John Morris wrote:
Hello,

My client is an non-profit internation medical research company doing
business in English only. Investigators are required to complete Word
2003 forms which include a date in a text form field. When the forms
are returned, the date field is filled in whatever language the
investigator has set as their Word default. Could be Russian, Czech,
Spanish, French, and so on.

Is there any way to set or lock the language in a text field?

Selecting the form field, or the whole document, and setting the
language has no effect on the languge that shows up in the text field.

Sorry if this has been dealt with recently.

John Morris



  #3   Report Post  
Posted to microsoft.public.word.newusers
John Morris John Morris is offline
external usenet poster
 
Posts: 5
Default Lock language in FORMTEXT

On Wed, 23 Sep 2009 09:41:28 +0300, "Graham Mayor"
wrote:

Hmmmm. There are several varieties of English with different date formats,
but assuming you can persuade users to run macros, it is possible to format
the date in the variety of English that you prefer. In the following
example, the date field is Text1 and the default format is configured as "d
MMMM yyyy" in the field properties. The two macros are run on exit and entry
to the fields 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 UK English (active) and Greek (inactive) to
demonstrate that it does in fact work.

Sub DateOnExit()
With ActiveDocument.FormFields("text1")
.Range.LanguageID = wdEnglishUK
'.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

http://www.gmayor.com/installing_macro.htm


Excellent. It worked perfectly and does exactly what is needed.

Thanks for this.

John Morris
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I lock a language? matthewshepherd Microsoft Word Help 2 February 21st 20 02:23 AM
Why do I see FORMTEXT code previewing fonts in envelopes? Gattman Microsoft Word Help 0 June 16th 06 06:04 PM
Printing an Attachment containing {FORMTEXT} Bernard Littman New Users 4 February 24th 06 12:18 PM
formtext in word 2003 [email protected] New Users 3 November 1st 05 07:17 PM
Field only displays {FORMTEXT} Glenn - Onslow County Page Layout 3 March 11th 05 09:44 PM


All times are GMT +1. The time now is 03:24 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"