What do you mean by "document"? Are these two different layouts in the same file?
Best bet is to use two scripts, one set up to print with printer 1 and one set up to print with printer 2. You can select your printer options for each printer in these separate scripts.
Then all you need do is perform the correct script for each "document".
Document = a print form. I'm a doctor and I'd like to print medicine orientation for my patients.
Thank you for your answer. But I'm new. After Scritp - Manager scripts - new script - print - choose printer - save... How can I run the script after? Is it necessary or my document will find my printer (from script adjusts automatically?).
Thank you again
Antonio Peregrino from Brazil.
"print form" sounds to me like you have two different layouts in your database file.
You can add a "print" button to each layout and set them to run the correct script for the printer that you want to use when printing from that layout. The script can open or not open the print dialog depending on whether you mighrt need to specify different settings.
After adding a print button to your layout, you can select the button while in layout mode and select "hide when printing" in the sliding and visibility part of the inspector's position tab to keep from printing the image of the button when you print from the layout.
A more sophisticated print script could be set up that checks the layout's name and then performs the correct print script for that layout, but I'd get the button on the layout version working first before trying this latter approach.
And if you have FileMaker Advanced, you can install a custom menu such that print from the File Menu (and the keyboard shortcut for print) performs your print script instead of the standard print operation.
It was exactly what I would like to do.
Thank you very much.