Not Visible Files

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
 
W

Word Heretic

G'day (e-mail address removed) (Let2Editor),

Yar, invis dox are fun huh :) Documents(1) will return your invis
file, but it will NEVER be ACTIVE because you cannot have a SELECTION
in an INVISIBLE window :)


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Let2Editor reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top