Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function zSpellChecker(ByVal sText As String) As String
' Create invisible word application
Dim wrd As Word.Application
Try
wrd = New Word.Application
wrd.Visible = False
Catch ex As Exception
Return sText
End Try
' Create a new document & range
Dim doc As Word.Document = wrd.Documents.Add()
Dim rng As Word.Range = doc.Range()
'Remove the line below-this is just to show how to add text
rng.Text = "This is a test of spell cheker"
' Set the range to the current Text and active the spellchecker
rng.Text = sText
doc.Activate()
doc.CheckSpelling()
' Read the Text (after spellcheck)
sText = doc.Range().Text
' Clean Up
doc.Close(SaveChanges:=False)
wrd.Quit()
While System.Runtime.InteropServices.Marshal.ReleaseComObject(wrd) <> 0
End While
wrd = Nothing
Return sText
End Function
' Create invisible word application
Dim wrd As Word.Application
Try
wrd = New Word.Application
wrd.Visible = False
Catch ex As Exception
MsgBox("An error occured while printing, please try again")
End Try
' Create a new document & range
Dim doc As Word.Document = wrd.Documents.Add()
Dim rng As Word.Range = doc.Range()
...
...
...
For Each StringDr In StringDv
Select Case StringDr("No")
Case 500
rng.Text = StringDr("Message")
doc.Activate()
doc.CheckSpelling()
' Read the Text (after spellcheck)
'sText = doc.Range().Text
Case 501
rng.Text = StringDr("Message")
doc.Activate()
doc.CheckSpelling()
' Read the Text (after spellcheck)
'sText = doc.Range().Text
...
...
...
End Select
Next
doc.SaveAs("c:\OperSeq.doc")
wrd.Quit()
While System.Runtime.InteropServices.Marshal.ReleaseComObject(wrd) <> 0
End While
wrd = Nothing
'doc.CheckSpelling()
' Read the Text (after spellcheck)
'sText = doc.Range().Text