請問如何在excel中實現只列印奇數頁或者偶數頁?

題目:

請問如何在excel中實現只列印奇數頁或者偶數頁?

解答:

Sub PrintOddPage()
Dim TotalPg As Integer
TotalPg = ExecuteExcel4Macro("GET.DOCUMENT(50)")
For i = 1 To TotalPg Step 2
ActiveSheet.PrintOut From:=i,To:=i
Next
End Sub
這個是宏.是列印奇數頁的.把For i = 1 To TotalPg Step 2改爲For i = 2 To TotalPg Step 2就變爲列印偶數頁了.

添加新評論

暱稱
郵箱
網站