mansky
02-14-2008, 01:20 PM
Hi all,
I'd like to extend one of my error handlers in a Word macro to trap a Word crash. That is, the event where Word itself collapses and you get a dialog window asking whether or not you want to submit a report to Microsoft or not.
Can this be done? And can it be done from inside VB so that one can keep Word up? Or do I need a daemon script running in the background to catch such events?
Here's a snippet of code I'd like to extend:
Sub PasteSpecial()
On Error GoTo Error_Handle
Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:=wdInLine
Error_Handle:
If (Err.Number > 0) Then
If (ActiveDocument.Undo = True) Then
MsgBox ("Undo PasteSpecial successful. Please re-try.")
End If
End If
End Sub
The line I have a question about how to extend to handle a complete crash is in Red above.
Any ideas would be greatly appreciated!
Thanks!
Ed
I'd like to extend one of my error handlers in a Word macro to trap a Word crash. That is, the event where Word itself collapses and you get a dialog window asking whether or not you want to submit a report to Microsoft or not.
Can this be done? And can it be done from inside VB so that one can keep Word up? Or do I need a daemon script running in the background to catch such events?
Here's a snippet of code I'd like to extend:
Sub PasteSpecial()
On Error GoTo Error_Handle
Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:=wdInLine
Error_Handle:
If (Err.Number > 0) Then
If (ActiveDocument.Undo = True) Then
MsgBox ("Undo PasteSpecial successful. Please re-try.")
End If
End If
End Sub
The line I have a question about how to extend to handle a complete crash is in Red above.
Any ideas would be greatly appreciated!
Thanks!
Ed