Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Not Visible Files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Let2Editor - 06 Jan 2005 22:36 GMT
  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
Word Heretic - 08 Jan 2005 03:58 GMT
G'day let2editor@aol.com (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:

>   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
[quoted text clipped - 13 lines]
>
>             Ed
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.