L
Let2Editor
I have a routine that performs functions A,B & C when a document is open
(determined by "If Documents.count>0") and functions D,E & F when no documents
are open (and the screen is 'grey').
Ocassionally a file that I opened in VBA with the "visible:=False" method
set apparently is still technically open although it appears not to be (i.e.,
the screen is grey) (and it is not supposed to be. The routine that was
supposed to close it did not.)
How can I test for the existence of an open, not visible document.and then
close it? Documents.count always returns 1 in this situation but if I try to
close the ActiveDocument I get a runtime error saying that the function cannot
be performed because no document is open.
Thanks,
Ed
(determined by "If Documents.count>0") and functions D,E & F when no documents
are open (and the screen is 'grey').
Ocassionally a file that I opened in VBA with the "visible:=False" method
set apparently is still technically open although it appears not to be (i.e.,
the screen is grey) (and it is not supposed to be. The routine that was
supposed to close it did not.)
How can I test for the existence of an open, not visible document.and then
close it? Documents.count always returns 1 in this situation but if I try to
close the ActiveDocument I get a runtime error saying that the function cannot
be performed because no document is open.
Thanks,
Ed