Spreadsheet.SetMargins
This function sets the margins for printing in twips.
SVB Example
Setting the margins:
Option Base 1 Option Explicit Sub Main Dim spr As Spreadsheet 'assigns the active spreadsheet to the object spr Set spr = ActiveSpreadsheet 'sets the top, bottom, right, and left print margins for the active spreadsheet to 1 inch 'Margin settings are displayed in the print preview for the spreadsheet spr.SetMargins(1440,1440,1440,1440) End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.