ドキュメントを印刷しようとしていますが、両面ではなく、両面印刷のみです。
したがって、ドキュメントをWord.Interop
開く前にドキュメントを印刷し、次のようにデフォルトのプリンターパラメーターを設定します。
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
PrinterSettings settings = new PrinterSettings();
foreach (string printer in PrinterSettings.InstalledPrinters)
{
settings.PrinterName = printer;
if (settings.IsDefaultPrinter)
{
settings.Duplex = Duplex.Simplex;
}
}
wordApp.Documents.Open(fullPath);
wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone;
wordApp.ActiveDocument.PrintOut(false);
wordApp.Quit(WdSaveOptions.wdDoNotSaveChanges);
これはうまく印刷されますが、常に表裏に印刷されます。デフォルトのプリンタ パラメータを変更する方法を教えてください。なぜsettings.Duplex = Duplex.Simplex;
機能しないのですか?
確認したところ、Duplex の値はsimplex
ドキュメントを開いたときです。