I'm not trying to play "I can write that code in # lines or less" ;-). Just curious and would like comment on advantages/disadvantages (if either) of using defined variables such as oDoc in this case and explicitly setting objects (oSection) to nothing when it appears that oSection is set to nothing automatically anyway.
Code:
Sub FixMarginII()
Dim oSection As Section
With ActiveDocument
If .Sections(1).PageSetup.PaperSize = wdPaperA4 Then
For Each oSection In .Sections
If oSection.PageSetup.Orientation = wdOrientLandscape Then
oSection.PageSetup.LeftMargin = InchesToPoints(1.8)
End If
Next oSection
.Save
End If
End With
lbl_Exit:
Exit Sub
End Sub