Results 1 to 2 of 2
2009-03-12, 20:52 #1
- Join Date
- Jan 2001
- Melbourne, Australia
- Thanked 0 Times in 0 Posts
we have an SQL database system. From the SQL db data is extracted and stored in a data .txt fle. A new Word document is created from a template and the data is picked up and inserted into fields. This takes a moment to process.
As the data is getting populated into the Word document, code needs to run to finalise the document by updating all fields.
However the problem is control is passed from the db to Word however I havent control or can grab a handle on when the data process is finished and then update all fields.
i was thinking of using an "event" however none seem applicable.
2009-03-12, 21:00 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
You could put code in the Document_Close event procedure in the ThisDocument module of the template; this code will be run when a document based on the template is closed.
Alternatively, you could put the code in the Document_Open event procedure in the ThisDocument module of the template; this code will be run when a document based on the template is opened.