With wb1.sheets("test")
.pagesetup.footermargin = wb2.sheets("xxx").pagesetup.footermargi
End
答案 0 :(得分:1)
试试这个:
Sub savefooter()
Dim twb as workbook
Dim wb2 as workbook
Dim a as variant
Application.DisplayAlerts = False
Set twb = ThisWorkbook
a = twb.Sheets("Sheet1").PageSetup.FooterMargin
Set wb2 = Workbooks.Open("C:\b.xlsx") ' set path to where your second wb is
wb2.Sheets("Sheet1").PageSetup.FooterMargin = a
wb2.Save
wb2.Close
Application.DisplayAlerts = True
End Sub