Worksheet.PrintOutEx 方法

列印工作表。

命名空間:  Microsoft.Office.Tools.Excel
組件:   Microsoft.Office.Tools.Excel (在 Microsoft.Office.Tools.Excel.dll 中)
  Microsoft.Office.Tools.Excel.v4.0.Utilities (在 Microsoft.Office.Tools.Excel.v4.0.Utilities.dll 中)

語法

'宣告
Sub PrintOutEx ( _
    From As Object, _
    To As Object, _
    Copies As Object, _
    Preview As Object, _
    ActivePrinter As Object, _
    PrintToFile As Object, _
    Collate As Object, _
    PrToFileName As Object, _
    IgnorePrintAreas As Object _
)
void PrintOutEx(
    Object From,
    Object To,
    Object Copies,
    Object Preview,
    Object ActivePrinter,
    Object PrintToFile,
    Object Collate,
    Object PrToFileName,
    Object IgnorePrintAreas
)

參數

  • From
    型別:System.Object
    要開始列印的頁碼。如果省略這個引數,則會從頭開始列印。
  • To
    型別:System.Object
    要列印的最後一頁的頁碼。如果省略這個引數,則會列印到最後一頁。
  • Copies
    型別:System.Object
    要列印的份數。如果省略這個引數,則會列印一份報表。
  • Preview
    型別:System.Object
    true 表示會讓 Microsoft Office Excel 在列印物件之前叫用預覽列印。false 則表示會立即列印物件。
  • ActivePrinter
    型別:System.Object
    設定作用中印表機的名稱。
  • PrintToFile
    型別:System.Object
    true 表示列印至檔案。如果未指定 PrToFileName,則 Excel 會提示使用者輸入輸出檔的名稱。
  • Collate
    型別:System.Object
    true 表示列印多份複本並自動分頁。
  • PrToFileName
    型別:System.Object
    如果 PrintToFile 設定為 true,則這個引數會指定您想要列印至 (檔案) 的檔案名稱。
  • IgnorePrintAreas
    型別:System.Object
    true 表示忽略列印區域並列印整個活頁簿,否則為 false。

備註

From 和 To 欄位中的「頁」是指列印的頁面,不是指工作表或活頁簿的整體頁面。

選擇性參數

如需選擇性參數的詳細資訊,請參閱Office 方案中的選擇性參數

.NET Framework 安全性

請參閱

參考

Worksheet 介面

Microsoft.Office.Tools.Excel 命名空間