How to print a word document duplex using OLE auti

2019-08-31 12:21发布

问题:

I am currently trying to print a created document on both sides of paper using the code below. But i cannot find any way to change it so the printer prints duplex without the user having to select print duplex.

If you have any suggestions it would be great.

Code:

Dlg := wrdApp.Dialogs.Item(88);
dlg.show;
           wrdApp.PrintOut(Background := false,
                             range := dlg.Range,
                             From := dlg.From,
                             To := dlg.To,
                             PageType := dlg.Type,
                             Copies := dlg.NumCopies,
                             Pages := dlg.Pages,
                             Collate := dlg.Collate,
                             PrintToFile := dlg.PrintToFile,
                             ManualDuplexPrint := dlg.DuplexPrint,
                             PrintZoomColumn := dlg.PrintZoomColumn,
                             PrintZoomRow := dlg.PrintZoomRow,
                             PrintZoomPaperWidth := dlg.PrintZoomPaperWidth,
                             PrintZoomPaperHeight := dlg.PrintZoomPaperHeight);

I want to execute the print without having to call the dlg.show; command.