Mail Merge....code runs faster than computer? (1 Viewer)

BigJimSlade

Registered User.
Local time
Today, 20:49
Joined
Oct 11, 2000
Messages
173
Hi, Big Jim here!

I am creating a few thousand mailmerge documents. Each one is saved with a filename equivalent to the customer number in the document being generated.

However, at random, the process seems to merge the same document twice causing an inconsistencey between the filename and customer number. Is there an object or some API function that can determine when the computer has caught up with the code?

I have tried DoEvents, but that did not work.
Also, I have run the program a dozen times, and each time, different letters come out wrong. I don't think it is a logic problem.

Thanks for your help!

Big Jim
 

BigJimSlade

Registered User.
Local time
Today, 20:49
Joined
Oct 11, 2000
Messages
173
Perhaps if I rearrange my question:

It seems that what is hurting my process is that a new version of the database I am writing my query to which the mailmerge and my code use opens up when the mailmerge document is loaded.

The application runs 10 times as fast this way, but the merge documents pull data from the query before it is updated. Is there a way to guarantee that the second instance of my database will have the correct sql in the query just updated in the other instance?

Thanks in advance!

Big Jim
 

Users who are viewing this thread

Top Bottom