T
Terry
Could somebody provide some advice on this issue?
What I'm trying to acheive is automate Words startup so that Word opens with
no document open and the user then is provided with a menu offering some
predefined templates.
This all works fine, the problem is the AutoRecovery issue. When Word
reopens after a crash, the autorecovery file flashes before you and then
gets closed.
I'm trying to trap this in code, but this is where i'm having difficulty,
here is the code which resides in the autoexec on startup.
If Documents.Count = 1 Then
If InStr(1, ActiveDocument.Name, "Recovered", vbTextCompare) = 0 Then
ActiveDocument.Close wdDoNotSaveChanges
End If
The purpose of this code is to close any open document unless its a
recovered one.
The document which autorecovery puts back is named something like "Document
1 (Recovered)" but the InStr function only sees the 1st part of the document
name and so doesnt recognise the autorecovery and closes the document.
Can anyone suggest a way around this?
What I'm trying to acheive is automate Words startup so that Word opens with
no document open and the user then is provided with a menu offering some
predefined templates.
This all works fine, the problem is the AutoRecovery issue. When Word
reopens after a crash, the autorecovery file flashes before you and then
gets closed.
I'm trying to trap this in code, but this is where i'm having difficulty,
here is the code which resides in the autoexec on startup.
If Documents.Count = 1 Then
If InStr(1, ActiveDocument.Name, "Recovered", vbTextCompare) = 0 Then
ActiveDocument.Close wdDoNotSaveChanges
End If
The purpose of this code is to close any open document unless its a
recovered one.
The document which autorecovery puts back is named something like "Document
1 (Recovered)" but the InStr function only sees the 1st part of the document
name and so doesnt recognise the autorecovery and closes the document.
Can anyone suggest a way around this?