Dim app As new MSExcel.ApplicationDim Wb As MSExcel.WorkBook = App.WorkBooks.Open("g:\test.xls")Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
With Ws.PageSetup .TopMargin=15 '上边距 .LeftMargin=50 '左边距End With
wb.saved = Trueapp.visible = TrueWs.PrintPreviewapp.quit