>Hi there.
>Anybody know how to set the default printer to landscape mode using code which does not invoke the printer dialog box?
>Thanks in advance.
If you open a report as a DBF and browse it you will see fields three of which are TAG, TAG2 and EXPR. You can delete the contents of TAG and TAG2 as this is a throwback from the old days and contains PRINTER SPECIFIC data.
EXPR
The contents look like this:
DRIVER=winspool **windows spooler
DEVICE=Brother HL-1040 series **printer driver as default
OUTPUT=LPT2: **port
ORIENTATION=1 ** to answer your question** 1 = Landscape, 0 protrait
PAPERSIZE=9 ** A4 for me
COPIES=1 ** No of copies
DEFAULTSOURCE=1
PRINTQUALITY=600
Etc.
You could write a little program that opened the report as a table and searched the EXPR field and changed the orientation, closed the table and then issue the repo form.....
Bernard