Is this code allowed as a check to see if Word is open before opening a second instance. I trapped error numbers and there were only 2 on my PC which are used to escape the procedure if word is not open. Thanks
Private Sub Command276_Click()
On Error GoTo Command276_Click_Error
WD.Application.Quit
On Error GoTo 0
Exit Sub
Command276_Click_Error:
If Err.Number = 462 Or Err.Number = 91 Then
Exit Sub
End If
End Sub
Private Sub Command276_Click()
On Error GoTo Command276_Click_Error
WD.Application.Quit
On Error GoTo 0
Exit Sub
Command276_Click_Error:
If Err.Number = 462 Or Err.Number = 91 Then
Exit Sub
End If
End Sub