PictureFormat.CropRight Property
Publisher Developer Reference |
Returns or sets a Variant indicating the amount by which the right edge of a picture or OLE object is cropped. Read/write.
Syntax
expression.CropRight
expression A variable that represents a PictureFormat object.
Return Value
Variant
Remarks
Numeric values are evaluated in points; strings can be in any units supported by Microsoft Office Publisher (for example, "2.5 in").
Negative values crop the bottom edge away from the center of the frame and positive values crop toward the left edge of the frame.
The valid range of crop values depends on the frame's position and size. For an unrotated frame, the lowest negative value allowed is the distance between the right edge of frame and the right edge of the scratch area. The highest positive value allowed is the current frame width.
Cropping is calculated relative to the original size of the picture. For example, if you insert a picture that is originally 100 points wide, rescale it so that it is 200 points wide, and then set the CropRight property to 50, 100 points (not 50) will be cropped off the right of your picture.
Use the CropLeft, CropTop, and CropBottom properties to crop other edges of a picture or OLE object.
Example
This example crops 20 points off the right of the third shape in the active publication. For the example to work, the shape must be either a picture or an OLE object.
Visual Basic for Applications |
---|
|
This example crops the percentage specified by the user off the right of the selected shape, regardless of whether the shape has been scaled. For the example to work, the selected shape must be either a picture or an OLE object.
Visual Basic for Applications |
---|
|
See Also