Sub Macro1() With Selection.PageSetup .PageWidth = CentimetersToPoints(21) .PageHeight = CentimetersToPoints(29.7) End With End Sub