http://www.getafile.com/cgi-bin/merlot/ ... lCheck.zip
Its a very small and easy code, bu very usefull since you can check the spell/grammar from PB.
I hope you like it

*Uses my dll, its included on the zip.
Checking Spelling from PB using Word - by Ricardo Arias
Code: Select all
;-Read the code from file
If OpenFile(0,"wordspellchecker.vbs"); Read the file to display it on the StringGadget
Its not important if you don't allow vbs because from my dll its not like doubleclicking a.vbsTronDoc wrote:I don't have MS Word nor do I allow .vbs so I can't try your program![]()
Joe
I don't know any one.Cor wrote:Is there a site where I can get this info about COM programming?
Code: Select all
Function CheckSpell(Text)
Set Word = CreateObject("Word.Application") 'Open Word
Word.Visible = False 'Not visible
Word.WindowState = 2
'Create a new instance of Document
Set Document = Word.Documents.Add( , , 1, True) 'Create a document
Document.Content=Text 'Put the text in Doc
Document.CheckSpelling 'Checking...
Document.CheckGrammar
MyText = Document.Content 'Get conten once its done
Word.quit nosave
CheckSpell = MyText
End Function
Code: Select all
Document.Content=Text '<< we tell Word the content
Document.CheckSpelling '<< we call CheckSpelling function
Document.CheckGrammar '<< we call CheckGrammar function
MyText = Document.Content '<< we get in our variable the content once its checked
Word.quit nosave '<< we ask Word to close and tell 'nosave' to avoid the promt asking us for save the file.
Use Ole Viewer (freeware) to see it, many times the names of the properties, methods events are self explicative.Code: Select all
@Ricardo, Where can I find an OLE viewer, and which type of file(s) do you view? btw. I'am gonna order this weekend :D