I am writing a simple scrabble program for students at my school.
I have this code and want it to just return good or bad.
I want to pass the letters they used to make one word and have Microsoft Words spell check tell me its a word or not. I don't care how to spell it I just want to make sure that when its scored it is actually a word or not. Can this be done in the background without showing Microsoft Word active? Microsoft Word can be running but I don't want it popping up with the dialog box suggesting words like this code does now.
TIA
DougP
I have this code and want it to just return good or bad.
I want to pass the letters they used to make one word and have Microsoft Words spell check tell me its a word or not. I don't care how to spell it I just want to make sure that when its scored it is actually a word or not. Can this be done in the background without showing Microsoft Word active? Microsoft Word can be running but I don't want it popping up with the dialog box suggesting words like this code does now.
TIA
Code:
Public Function Spellcheck(TextStr As String) As String
Set Wordapp = CreateObject("Word.Application")
Wordapp.Documents.Add
'Dim wordrange As Word.Range
Set wordrange = Wordapp.ActiveDocument.Range(0, 0)
wordrange.Text = TextStr
Wordapp.Visible = True
Wordapp.Activate
wordrange.CheckSpelling , , True
'wordrange.CheckGrammar
Spellcheck = wordrange.Text
' wordrange.Text = ""
' WordApp.Documents.Close (False)
' WordApp.Quit
' Set WordApp = Nothing
End Function
DougP