Hi Experts. I'm hopng somebody can provide me with some guidance.
I am using a printout command and the MODI printer to create a tif document that is then used for processing with an IBM image plus system. The user click on a button to invoke the printout command, which works quite well.
Problem is, after the command execute, the user's default printer is set to the document image writer. I've gotten around this by capturing their active printer prior to invoking the printout command, then setting the default printer back to what is was.
Problem I have now is that the "Print to File" option remains selected even for the default printer when it is set back. I need to set the "Print to File" option to true in the printout command for the document image writer for the document to come across properly, but need it to switch back when I switch the default printer back.
I've tried to set it back after I revert to the previous printer by invoking another printout command and setting the page range to 0,0. This does the job, but it prints out a blank page (almost blank - two characters in upper right hand corner of the page.
Is there another way to set this back with VBA?
I've attached the relevant code..
Many thanks for any assistance that can be provided.
DefaultPrinterName = ActivePrinter
ActivePrinter = "Microsoft Office Document Image Writer"
PrintOut False, , , StrFileName, , , , , , , True
ActivePrinter = DefaultPrinterName
PrintOut False, , 3, , "0", "0", , , , , False