MsSpellCheck( string ) : string
This short and sweet function accepts a string containing text to be spell checked, checks the text for spelling using MS Word automation, and then returns the processed text as a string. The familiar MS Word spelling dialog will allow the user to perform actions such as selecting from suggested spellings, ignore, adding the word to a customized dictionary, etc.
AI
AI சுருக்கம்: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
மூலக் குறியீடு
' Description: This function accepts a string containing text to be ' spell checked, checks the text for spelling using MS Word automation, ' and then returns the processed text as a string. The familiar ' MS Word spelling dialog will allow the user to perform actions such ' as selecting from suggested spellings, ignore, adding the word to a ' customized dictionary, etc. ' Syntax: MsSpellCheck( String ) : String ' Author: Eric Russell ' E-Mail: [email protected] ' WEB Site: http://cris.com/~erussell/VisualBasic ' Created: 1998-13-14 ' Revised: 1998-04-03 'Compatibility: VB 5.0, VB 4.0(32bit) ' Assumptions: The user must have MS Word95 or higher installed on 'their PC. ' References: Visual Basic For Applications, Visual Basic runtime 'objects and procedures, Visual Basic objects and procedures. ' Function MsSpellCheck(strText As String) As String Dim oWord As Object Dim strSelection As String Set oWord = CreateObject("Word.Basic") oWord.AppMinimize MsSpellCheck = strText oWord.FileNewDefault oWord.EditSelectAll oWord.EditCut oWord.Insert strText oWord.StartOfDocument On Error Resume Next oWord.ToolsSpelling On Error GoTo 0 oWord.EditSelectAll strSelection = oWord.Selection$ If Mid(strSelection, Len(strSelection), 1) = Chr(13) Then strSelection = Mid(strSelection, 1, Len(strSelection) - 1) End If If Len(strSelection) > 1 Then MsSpellCheck = strSelection End If oWord.FileCloseAll 2 oWord.AppClose Set oWord = Nothing End Function
அசல் கருத்துகள் (3)
வேபேக் மெஷினிலிருந்து (Wayback Machine) மீட்டெடுக்கப்பட்டது