On Jun 28, 1:58*pm, "Larry" <larry328NOS...@xxxxxx> wrote:
I recall a script that would use Word to spell check items in the clip
board. You might find something in here that would work for you.
' <--------------- Begin Script ------------------------>
Dim oWD, RangeOriginal, RangeCorrected, Cnt, Status
Set oWD = WScript.CreateObject("Word.Application")
oWD.Visible =false
oWD.Documents.Add
On Error Resume Next
oWD.Selection.Paste
If err.number<>0 then
MsgBox "Clipboard was Empty"
oWD.ActiveDocument.Close wdDoNotSaveChanges
oWD.Quit
Set oWD=Nothing
Set oWD=Nothing
WScript.Quit
End If
'
Set RangeOriginal=oWD.ActiveDocument.Range(0,oWD.Selection.End)
If oWD.CheckSpelling(RangeOriginal)=False Then
oWD.ActiveDocument.CheckSpelling
Set RangeCorrected = oWD.ActiveDocument.Range(0,oWD.Selection.End)
RangeCorrected.copy
'
If RangeCorrected.Words.Count>7 Then
Cnt=RangeCorrected.Words.Count
Status= "The text beginning with: "&_
RangeCorrected.Words.Item(1)&" "&RangeCorrected.Words.Item(2)&" "&_
RangeCorrected.Words.Item(3)&"....."&vbCRLF&"and ending
with: ....."&_
RangeCorrected.Words.Item(Cnt-2)&" "&RangeCorrected.Words.Item(Cnt-1)
&_
" "&RangeCorrected.Words.Item(Cnt)&VbCrLf
End If
'
Else
Status= "All words in the clipboard were spelled correctly"
MsgBox Status
End If
'
oWD.ActiveDocument.Close wdDoNotSaveChanges
oWD.Quit
Set oWD=Nothing
'< ------ end script
----------------------------------------------------------------->