Pages: 1
Printing to different printers based on message values

I would like to be able to print a message to a specific printer based on the recipient email address or the sender or some other filter-able element.

Is this possible?

At the moment it prints to the default selected printer.

I'm wondering if scripting to change the default printer then print is the way it can be done. I would like another way of doing it.

I also need to print some emails 2 times with slightly different text added to the print out. This would be to the same printer each time.

If anyone has some suggestions I would appreciate the help.
You can change the default printer from the prompt with the command:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "printer"
So if you run that as an external command via your filter, and as second action you have the message printed that might have the desired result.

Printing the message in two different layouts can be done by adding two print actions to your filter. Each action has its own print template.
I'm just a user of The Bat! I don't work for Ritlabs.
Hello Roelof,

Thanks for the reply. I have tested this for a while. The command does change the printer if I run it as a CMD outside of the Bat.

It will also change the printer if I run it as an external command however the filter still prints to the printer that was default when the filter was made. At least that is how it seems.

It changes the default printer but still prints to the previous default printer.

This may be a good thing anyway. I need to test this some more. So long as I know to set the default printer to the one I want when I am creating the filter is might always print where I want it to anyway.

I will test some more on this.
ok so quickly I determine that the Bat checks the printer on start up and stays with that printer until the next time the Bat starts where it will check for the default printer. Seems to be my far.

I'd really like to be able to change printers on the fly as emails are being filtered.
Pages: 1