How to print a word document duplex using OLE autimation with delphi xe3

岁酱吖の 提交于 2019-12-11 16:50:52

问题


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.

来源:https://stackoverflow.com/questions/20948460/how-to-print-a-word-document-duplex-using-ole-autimation-with-delphi-xe3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!