Change Spelling Dictionary from Menu

This Agent changes the NOTES.INI variable responsible for the spellchecker language (SPELL_LANG).

You have to set up a shared agent, which is called manually from the actions menu (run once (@Commands may be used)). Because I use this agent for several languages this agents exists several times in my mail database. As name I recommand something hierarchical (DictionarySet English - UK) so you can build your own menu for the dictionaries you will use.

As you can see I have set up agents for English (UK), English (USA), French, Italian, German (Standard) and German (Reform).

Declarations: %INCLUDE "lsconst.lss"

Sub Initialize

Dim s As New NotesSession
Dim sDictionary As String
Dim boxType As Long, ret As Integer
Dim sTempString As String
Dim sDir As String, iFile As Integer
Dim FileName As String

On Error Goto Errhandle

sDictionary = s.GetEnvironmentString( "SPELL_LANG", True )

Select Case sDictionary
Case "1031" :
sTempString = "German (Standard)"
Case "1033":
sTempString = "English (USA)"
Case "1036":
sTempString = "French"
Case "1040":
sTempString = "Italiano"
Case "2057":
sTempString = "English (UK)"
Case "32775":
sTempString = "German (Reform)"
Case Else :
sTempString = "unknown"
End Select

ret% = Messagebox("The active dictionary is: " & sTempString, boxType&, "Continue?")
If ret = 6 Then
sDir$ = s.GetEnvironmentString( "Directory", True )
Chdir sDir$
iFile% = Freefile()
FileName$ = "uk.dic"
Open FileName$ For Input As iFile%
Close iFile%
Call s.SetEnvironmentVar( "SPELL_LANG", "2057", True )
Msgbox "You now have changed the spelling dictionary to English (UK)", 0+64, "Dictionary"
Exit Sub
End If
Exit Sub

Select Case Err
Case 101 :
Msgbox "The selected dictionary 'uk.dic' wasn't found in your NotesData", 0+64, "Error"
Exit Sub
Case Else :
Messagebox "Error" & Str(Err) & ": " & Error$
Exit Sub
End Select

End Sub

This was last published in March 2001

Dig Deeper on Lotus Notes Domino Agents



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...