C
Chip Orange
I have the following code segment designed to intercept all document
closings in Word 2002 under win2k:
Public WithEvents wdApp As Word.Application
Private Sub Document_New()
'assign Word to the application variable
If wdApp Is Nothing Then
Set wdApp = Application
End If
End Sub
Public Sub wdApp_DocumentBeforeClose(ByVal Doc As Document, Cancel As
Boolean)
If strOpenedRecFile = Doc.Name Then
....
The reference to doc.name sometimes causes an "object has been deleted"
error which is rarely reproducable.
Any ideas?
thanks.
Chip
closings in Word 2002 under win2k:
Public WithEvents wdApp As Word.Application
Private Sub Document_New()
'assign Word to the application variable
If wdApp Is Nothing Then
Set wdApp = Application
End If
End Sub
Public Sub wdApp_DocumentBeforeClose(ByVal Doc As Document, Cancel As
Boolean)
If strOpenedRecFile = Doc.Name Then
....
The reference to doc.name sometimes causes an "object has been deleted"
error which is rarely reproducable.
Any ideas?
thanks.
Chip