![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | My .vbs file for spell checking I didn't realise there was a vbscript NG so I submitted the below in the Wsh NG. I hope it makes sense to resubmit here! I want to have an icon on my desktop that open a spell checker. So I use Check.vbs as below. The problem is it is: 1) Slow to open 2) If word defaults to no check my app does not check. 3) It's my first script so I'd appreciate an suggestions that improve it. Thanks in advance Option Explicit Dim objWord, Word, WshShell, BtnCode, strSuggestion, lstSuggestions Const wdDoNotSaveChanges = 0 Set objWord = CreateObject("Word.Application") Set WshShell = WScript.CreateObject("WScript.Shell") Do While True word = InputBox ("What word would you like to check?","Type the word to check","") if word = "" then objWord.Quit (wdDoNotSaveChanges) Set objWord = Nothing set WshShell = nothing WScript.Quit end if objWord.visible=False objWord.Documents.Add.Content = word if objWord.CheckSpelling(word) then lstSuggestions = "Word is spelled OK." else lstSuggestions = "" for each strSuggestion in objWord.GetSpellingSuggestions(word) lstSuggestions = lstSuggestions & vbCrLf & strSuggestion next end if 'Set WshShell = WScript.CreateObject("WScript.Shell") BtnCode = WshShell.Popup(lstSuggestions, , "Spelling Suggestions for """ & word & """. Click OK to Enter Another Word", 1 + 32) Select Case BtnCode case 2 objWord.Quit (wdDoNotSaveChanges) Set objWord = Nothing set WshShell = nothing WScript.Quit case -1 WScript.Echo "Is there anybody out there?" End Select Loop |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Spell checking | Vista mail | |||
| Spell checking | Vista mail | |||
| Spell Checking anywhere | Software | |||
| Spell Checking | Vista mail | |||