请教高手Excel文件双面打印,要求页码在外侧如何设置?

2024-12-16 21:36:00
推荐回答(2个)
回答1:

用宏解决吧。确保默认打印机正确。
同时按Alt和F11进入宏界面,点菜单的插入,模块,粘贴如下代码:
Sub test()
Dim i As Byte
For i = 1 To (ActiveSheet.HPageBreaks.Count + 1) * (ActiveSheet.VPageBreaks.Count + 1) Step 2
ActiveSheet.PageSetup.RightFooter = "&P"
ActiveSheet.PrintOut from:=i, To:=i
Next i
MsgBox "请去打印机处反过来放入打印好的纸,然后回来按OK", vbOKOnly, "Hi"
For i = 2 To (ActiveSheet.HPageBreaks.Count + 1) * (ActiveSheet.VPageBreaks.Count + 1) Step 2
ActiveSheet.PageSetup.LeftFooter = "&P"
ActiveSheet.PrintOut from:=i, To:=i
Next i
End Sub

在此界面下直接按F5,OK。

回答2:

转换成pdf格式,用pdf真正打印。