SmartIcon to run Spell Language and Spellcheck in one step

This functionality allows you to set the SpellLanguage and run the SpellChecker in one step.

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.

- create a SmartIcon with Formula
- 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
	Case 2: s.SetEnvironmentVar "SPELL_LANG", "32775", True ' DE neue
	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	
	Messagebox "Error" & Str(Err) & ": " & Error$
	Msgbox "No Input. SpellCheck aborded." 
	Exit Sub
End Sub

Dig Deeper on Domino Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • 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 ...