This functionality allows you to set the SpellLanguage and run the SpellChecker in one step. First answer the question with your language (keep in mind that the language.dic has to be installed) and wait for your spelling results.
To-Do: - create a SmartIcon with Formula @Command([ToolsRunMacro];"NameOfMacro") - create an SharedAgent/Runonce/Script - paste Code and modify your favorites
Sub Initialize On Error Goto Errhandle Dim s As New NotesSession Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim num As Integer Dim latestNumber As String Dim Title As String Dim old As Integer latestNumber = s.GetEnvironmentString( "SPELL_LANG", True ) Select Case latestNumber Case "1031": Title = "German (Standard)" ' German (Standard) old = 1 Case "32775": Title = "German (Reform)" ' German (Reform) old = 2 Case "1033": Title = "Englisch US" ' English US old = 3 Case "2057": Title = "English GB" ' English GB old = 4 Case Else : Title = "Language not known." End Select num% = Cint(Inputbox$(_ "1 = German (Standard) " &"2 = German (Reform)" & Chr(10)&_ "3 = English (US) " &"4 = English (GB)" & Chr(10),Title,old, 1,1)) Select Case Num Case 1: s.SetEnvironmentVar "SPELL_LANG", "1031", True ' DE alte Rechtschreibung Case 2: s.SetEnvironmentVar "SPELL_LANG", "32775", True ' DE neue Rechtschreibung Case 3: s.SetEnvironmentVar "SPELL_LANG", "1033", True ' Englisch US Case 4: s.SetEnvironmentVar "SPELL_LANG", "2057", True ' Englisch GB Case Else : Msgbox "Wrong Input. Active Directory is used. " End Select Set uidoc = workspace.CurrentDocument Call uidoc.SpellCheck() Exit Sub Errhandle: Messagebox "Error" & Str(Err) & ": " & Error$ Msgbox "No Input. SpellCheck aborded." Exit Sub End Sub
This was first published in July 2001