WD2000: Document Language Changes Unpredictably

ID: Q220573


The information in this article applies to:


SYMPTOMS

When you change the language of a document style using Visual Basic for Applications or by using Style on the Format menu, the style may appear to unpredictably change to another language while you type.


CAUSE

This behavior is by design. The Detect language automatically option is turned on.

NOTE: If you have a single keyboard installed, the automatic language detection feature uses the language defined in the normal style. If you have multiple keyboards installed, the automatic language detection feature uses the language of the keyboard that is currently active. If you switch keyboards while editing a document, Word switches the language at the insertion point to match the active keyboard.


RESOLUTION

To work around this behavior, turn off the Detect language automatically option.

To turn off Detect language automatically:

  1. On the Tools menu, point to Language, and then click Set Language.


  2. Click to clear the Detect language automatically check box.


  3. Click OK.


If you are using Visual Basic for Applications to set the language of the styles used in a document, you can use the following sample macro to also turn off Detect language automatically:


Sub SetStyleLanguage()
   Dim oStyle As Style
   If Documents.Count = 0 Then Exit Sub      ' A document must be open.
   Application.CheckLanguage = False         ' Turn off LAD.
   For Each oStyle In ActiveDocument.Styles  ' Change the language for all
      With oStyle                            ' styles used in the document.
         .LanguageID = wdFrench
         .NoProofing = False
      End With
   Next
End Sub 


MORE INFORMATION

For more information about automatically detecting languages, click Microsoft Word Help on the Help menu, type "Detect Language Automatically" in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Additional query words:


Keywords          : kbdta wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: June 4, 1999