VFP9SP1

Our classic app has used the following code for years for spell-checking,
but it's not working for Word 2007 on Vista:

*-------------------------------------------------------------------------
local cObject, cX, cY

cObject = this.Obj2Check
if type('thisform.skipdeactivate') = "L"
        thisform.skipdeactivate = .T.
endif

This.oWord = NewObject("word.application")

If !This.WordMissing
        With This.oWord
                .Documents.add
                cX = allt(This.Parent.&cObject..Value)
                *wait window cx
                .Selection.TypeText(cX)

                .Activedocument.CheckSpelling
                .Selection.WholeStory

                cY = allt(.Selection.Text)
                cY = iif(asc(right(cY,1)) = 13, left(cY, len(cY)-1), cY)
                if !empty(cX) and empty(cY)
                        this.error(0,"Click",0)
                else
                        if cX != cY
                                This.Parent.&cObject..Value = .Selection.Text
                                if type('Thisform.isediting') = "L"
                                        Thisform.isediting = .T.
                                        Thisform.SetEditbtn
                                endif
                        endif
                        wait window nowait "Spell Check Complete"
                endif
                .ActiveDocument.Close(0)
                .Quit
        EndWith
EndIf

if type('thisform.skipdeactivate') = "L"
        thisform.skipdeactivate = .F.
endif

*-------------------------------------------------------------------------

Ideas as to workaround/fix?  I'm juggling a bunch of things now so I just
wanted to throw this out to the group to see what the experts say.  ;-)

tia!
--Mike




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to