Close Word spell check from VB6
Posted on 2008-10-12
I am using MSWord to check spelling in a VB6 text box. The spell check itself works fine, but will not close properly. MSWord is set as a public application:
Public AppWord As Application
Set AppWord = GetObject(, "Word.Application")
I would prefer to simply Quit the application when spell checking is complete. However, I get a MSWord alert to Save Changes which does not respond to the following SendKeys to close it out.
Private Sub CmdExit_Click()
.DisplayAlerts = wdAlertsNone 'Do you want to save changes?
Set AppWord = Nothing
MSWord continues to run.