views:

289

answers:

2

Preferably using a scripting language like Perl or Python, but if I have to go the compiled route then so be it.

Essentially what I want to do is make an addition to my company's mail merge system. Right now, the software we use has a rather limited selection of mail merge fields that it exports, but if we could somehow incorporate results of database queries into the letters, we could accomplish much more (and unfortunately Word doesn't provide enough flexibility with database queries to accomplish this). The system we use automatically sends its letters to the default printer (which is a peer-to-peer printer, no print server). I would like to create a program that could act as a middleman for this. Ideally, it would detect when a print job is fired, capture the sent document, open it, insert extra data from its own queries, then send the new version to the printer.

I have two questions

  1. Is this even possible, if so, where do I start?
  2. Is this feasible for one person to complete in a reasonable time frame? Keep in mind I'm not a programmer by trade, I'm the sysadmin type of person =P
+2  A: 

Honestly this is an incredibly hard road to go down. Maybe try creating a virtual printer that dealt with the data and forwarded it onto the real printer. Will see if I can find anything for you.

Chazadanga
+1, really really difficult, I don't even know where to begin.
Clement Herreman
A: 

If you are using Word, I think you would find it vastly easier to implement your enhanced mail merge system in Visual Basic. I suspect it would be vastly, vastly harder to intercept the jobs at that level. If you prefer Perl or Python to VB, you could even write .py/.pl scripts to run the queries and generate .vbs scripts. You could also use OpenOffice, which can be scripted with Python.