wp.setRightMargin

Syntax wp.setRightMargin (position)

Params position is a number indicating the number of pixels to the left of the end point of the ruler where the right margin should be set.

Action Sets the right margin for the selection in the target window to a point position pixels to the left of the end point on the ruler. If the selection is empty, this verb applies to the paragraph in which the cursor appears.

Returns True

Examples edit (@examples.testText2);
wp.setSelect (0, 0) « to ensure cursor is at upper left of document
wp.setRightMargin (216)

   » true

The margin is now set just past the 3-5/8 inch mark for the first paragraph.

Notes It is possible to set the right margin value to the left of the left margin, but doing so can result in strange document displays and other unexpected behavior. You should always ensure that the left margin remains to the left of the right margin.

See Also wp.getLeftMargin

wp.getRightMargin

wp.setLeftMargin

Discuss