Spell Check Vba Word
To check spelling or grammar from a visual basic procedure use the checkspelling method to check only spelling and use the checkgrammar method to check both grammar and spelling.
Spell check vba word. If the document or range contains errors this method displays the spelling and grammar dialog box tools menu with the check grammar check box cleared. Otherwise only spelling is checked. Go to the review tab in the ribbon in the excel spreadsheet.
This example returns the status of the check grammar with spelling option on the spelling grammar tab in the options dialog box. Option explicit sub mycheckspelling msgbox demo one field spell check select paragraph activedocument bookmarks para select with selection if vba6 then only word 2000 noproofing false end if set language languageid wdenglishus run spell checker range checkspelling end with end sub this is the code to use if you want this to run on exit from the last field on the form template. This little excel vba function always returns false no what word is passed in.
Function spellcheck someword as string spellcheck application checkspelling someword end function. For a document this method checks all available stories such as headers footers and text boxes.