Word is fast becomming a four letter word. I thought I had covered every eventuality of Word closing/Being Open/Minimised behind my application. But now I find one can close the document, say no to saving, which leaves the empty application staring at me and allows me to close it down bypassing my application quit procedure. As I cannot find any other event other than Quit/DocumentChanged after initialising Word withevents, maybe I have missed something.
Using:
Set w1 = New Word.Application
w1.Documents.Add
w1.Visible = False
Set Range = w1.ActiveDocument.Range(Start:=0, End:=0)
w1.ActiveDocument.Tables.Add Range:=Range, NumRows:=DAA + 3, NumColumns:=7 ' add table etc
Should I have done a Set xx = New Word.Document somewhere to have got a document quit procedure to use.
In my quit I am using W1.Application Quit, or W1.Quit and setting W1 = Nothing. Many thanks
Using:
Set w1 = New Word.Application
w1.Documents.Add
w1.Visible = False
Set Range = w1.ActiveDocument.Range(Start:=0, End:=0)
w1.ActiveDocument.Tables.Add Range:=Range, NumRows:=DAA + 3, NumColumns:=7 ' add table etc
Should I have done a Set xx = New Word.Document somewhere to have got a document quit procedure to use.
In my quit I am using W1.Application Quit, or W1.Quit and setting W1 = Nothing. Many thanks