我找不到任何方法可以自定义任何单个打印机的打印机设置。这是适用于我的 EXCEL 应用程序的代码。
CommonData._WORKBOO
K 是一个静态工作簿对象
Worksheet ws = CommonData._WORKBOOK.Application.ActiveSheet as Worksheet;
var _with1 = ws.PageSetup;
_with1.Orientation = Microsoft.Office.Interop.Excel.XlPageOrientation.xlLandscape;
CommonData._WORKBOOK.Application.Dialogs[Microsoft.Office.Interop.Excel.XlBuiltInDialog.xlDialogPrint].Show(Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);