CreganTur
03-05-2009, 09:47 AM
I've got an issue I'm trying to figure out on a big project I'm working on. I'm going to try to provide concise logic on what I need without being verbose.
I've got an Access database that contains customer records. This data needs to be printed on a form letter that is already setup in Word. I've got a Mail Merge connection setup between the document and a query in the database so that only those records that are ready to be printed will be sent over. The easiest way to print these letters, that I know of, is to do a Merge To Printer.
Here's the issue I'm trying to figure out: I want to setup some code that will update the [Printed] field in the table (a yes/no field) to yes when each record is printed. This will serve as real-time tracking of every document that is printed. I want to set this up so that if the print is interrupted for some reason, the associate will be able to pick up printing where they left off. Doing this will also allow the user to Merge To Printer a range of documents, instead of all of them, if they choose.
My original thought was to update the records in Access by executing an update query via ADO, grabbing the account number off of the mail merge document as the WHERE condition. My issue is that I have no idea if this can be done while the records are actually being printed. I also have no idea what event I could use to trigger this code. My research of the MailMerge object model hasn't provided any insights, so I'm really hoping for a nudge in the right direction.
I've got an Access database that contains customer records. This data needs to be printed on a form letter that is already setup in Word. I've got a Mail Merge connection setup between the document and a query in the database so that only those records that are ready to be printed will be sent over. The easiest way to print these letters, that I know of, is to do a Merge To Printer.
Here's the issue I'm trying to figure out: I want to setup some code that will update the [Printed] field in the table (a yes/no field) to yes when each record is printed. This will serve as real-time tracking of every document that is printed. I want to set this up so that if the print is interrupted for some reason, the associate will be able to pick up printing where they left off. Doing this will also allow the user to Merge To Printer a range of documents, instead of all of them, if they choose.
My original thought was to update the records in Access by executing an update query via ADO, grabbing the account number off of the mail merge document as the WHERE condition. My issue is that I have no idea if this can be done while the records are actually being printed. I also have no idea what event I could use to trigger this code. My research of the MailMerge object model hasn't provided any insights, so I'm really hoping for a nudge in the right direction.