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.

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

Dig deeper on Domino Resources

0 comments

Oldest 

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:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close