Within the Excel object library is there an interface to setting the print preferences to print the entire workbook instead of开发者_JAVA技巧 the active sheet?
No, PageSetup applies only to sheets
Best you can do is a macro to copy the required settings
Sub CopyPageSetup()
Dim sh As Worksheet, cl As Range
Dim shBase As Worksheet
Set shBase = ActiveSheet
For Each sh In ActiveWindow.SelectedSheets
If sh.Name <> shBase.Name Then
sh.PageSetup.Orientation = shBase.PageSetup.Orientation
' Add other PageSetup properties here '
' unfortunately sh.PageSetup = shBase.PageSetup does not work '
End If
Next
End Sub
精彩评论