Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I stall/delay auto open

Status
Not open for further replies.

pluz

Instructor
Jan 26, 2004
20
US
I have 10 documents that are being opened in Word 2k. One of the documents contains an auto open macro w/userform that performs a search and replace in all 10 docs. Problem is, the doc with the code does not wait for the other documents to open, it just starts running. Is there a way to stall or delay the macro until all docs are open? Docs are coming from dms (iManage). Thanks for whatever help I can get here!
 
The Application Object has a Documents Collection, whose Count Property represents all open documents. You could just instantiate a Timer Object and every timer event, check the Application.Documents.Count Or, if you hate the Timer Object as much as I do, just write a loop inside a loop that counts to 1000 then checks the Count. When it is equal to 10(or whatever your number is), go ahead and do your processing.

Tranman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top