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 macro 1

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!
 
With no experience on what you are doing, this is more like a guess, but you could try using the command DoEvents. This makes VB finish everything it is supposed to do before it moves on to the next line. Good luck.
 
I would have the the first document open all other documents.

I would then loop checking that all 10 documents are open before continuing via the .Documents property of the application.


Hope I've been helpful,
Wayne Francis

If you want to get the best response to a question, please check out FAQ222-2244 first
 
The documents are not saved locally. They are coming from a document management system (iManage). No matter what I do the UserForm runs as soon as the document is open and this stops the other iManage docs from opening until the userform is run or canceled. Does anyone know how to open dms docs using vb? This way, I can have the auto open macro open dms docs as suggested above. Appreciate any help here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top