本示例将活动文档的下边距设置为 72 磅(即 1 英寸),上边距设置为 2 英寸。
InchesToPoints 方法用来将英寸转化为磅值。

With ActiveDocument.PageSetup
    .BottomMargin = 72
    .TopMargin = InchesToPoints(2)
End With

 

本示例返回所选部分第一节的下边距。
PointsToInches 方法用来将结果转换为英寸。

Dim sngMargin As Single
sngMargin = Selection.Sections(1).PageSetup.BottomMargin
MsgBox PointsToInches(sngMargin) & " inches"