Click to See Complete Forum and Search --> : windows message handling


milind
September 15th, 2001, 04:11 AM
Hello,

Will some one help me out in acting on windows messages in VB6? For example if MS word is open and user is editing the file, I want VB to check which file is open and save the file in occurence of "ActiveWindow.Close", and "Application.Quit " . This is to avoid loosing any text in case of sudden windows shutdown. Please do suggest some codes ( I am not worrried about autosave option in MS word.)

Thanks in advance
Milind

JeffB
September 16th, 2001, 03:47 PM
You can use 2 fonctions


private Sub Form_Terminate()
End Sub

private Sub Form_Unload()
End Sub




I do not really know the differences between the 2, but unload is call before terminate

milind
September 16th, 2001, 10:23 PM
Thanks Jeff, probably I need some more detail answer. The functions you explained will work fine only on VB forms , I want to control MSword and other office application before OS shutdown.

Milind