Turning off Word Spell/grammer check programmatically in VFP  
Author Message
thenxtgoldberg





PostPosted: Visual FoxPro General, Turning off Word Spell/grammer check programmatically in VFP Top

Can anyone help me out here

I am trying to turn off the spell check and grammatical check in word through a VFP application. I cannot find the correct property for the two to use....

I ran a macro to try and get it, but the macro uses

.CheckSpellingAsYouType

.CheckGrammarAsYouType

.CheckGrammarWithSpelling

etc... but when trying these properties in VFP they do not translate obviously... I get ole error - unkown name

If anyone could help me out here.. that would be great.. I have searched for about 3 hours now and can't seem to get it correct.. thanks for any help




Visual FoxPro2  
 
 
AndyKr





PostPosted: Visual FoxPro General, Turning off Word Spell/grammer check programmatically in VFP Top

Try this:

*** Reference to Word
ow =
CREATEOBJECT('word.application')

*** Get a reference to the Options Object
oWOpt = ow.Options

*** Set whatever you want...
oWOpt.CheckGrammarAsYouType =
.F.
oWOpt.
CheckSpellingAsYouType = .F.

You can even do this in the command window and use IntelliSense to see all the things on the Options Object