With ActiveDocument.PageSetup
Msgbox "The margin is " _
& PointsToInches(.RightMargin) & " inches."
End With
本示例设置文档选定部分第二节的右边距。
InchesToPoints 方法用来将英寸转换为磅值。
Selection.Sections(2).PageSetup.RightMargin = InchesToPoints(1)