[RESOLVED] Closing a Word Document & Application
Hello guys.
I'm getting really really frustrated with Word's Document Recovery Pane everytime I launch Word - it is making me very mad! :mad:
I'm busy with a program which assists me with all my exams, right, now, with this program I'm launching each program associated with each exam. After the document / spreadsheet etc. is shown, I mark what I need to, then, I have a button which closes the current process, and returns me to my default application interface.
All this is working, except for the .doc files, Word files. :mad:
Everytime I launch word, I get the Document recovery pane!
I've tried the following :
Code:
If SSSubject = "WINWORD" Then
For Each SSProcess In SSNoteProcess
SSProcess.CloseMainWindow()
SSProcess.Kill()
Next
Dim winHwnd As IntPtr
winHwnd = FindWindow(vbNullString, SSSubjectFold)
If Not winHwnd.Equals(IntPtr.Zero) Then
PostMessage(winHwnd, WM_CLOSE, 0, 0)
End If
End If
As a last resort ( and this doesn't work ), because WordDocument.close does not work, WordApplication.Quit does not work!
By, saying it doesn't work, means it closes everything, yes, but the Document Recovery PAne always shows up, and I can't understand why!
Is there some way of disabling it completely ¿
I know some will say it is not a good idea, I know, I know :rolleyes: I really need to get rid of it.
Please, please, please, if anyone can help me it will be greatly appreciated :)
// At the rate I'm pulling out my hair today, I'll be bald soon.... :o
Re: Closing a Word Document & Application
Save all the files (again) before you close it.
I don't like to see you killing any processes without letting them shut down. It's a guaranteed way to get errors.
Re: Closing a Word Document & Application
The cause of this (the showing of the recovery pane) might be some word recovery files sitting somewhere in temp folder, try to delete them.
check this path (Vista)
Code:
C:\Users\USER\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Word\
Re: Closing a Word Document & Application
Thank you guys, especially memeloo! :thumb:
Your idea sparked another idea :)
I've found that You need to remove the keys under "DocumentRecovery" at the following
registry location for
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Resiliency\DocumentRecovery.
That has solved the issue, thanx!
memeloo, I'll rate you as soon as I can :)
Re: [RESOLVED] Closing a Word Document & Application
This registry key is new to me, so I'll keep your part in mind too, in case I should need it someday ;]