CanvasCropTop Method

Microsoft Word Visual Basic

Show All

CanvasCropTop Method

       

Crops a percentage of the height of a drawing canvas from the top of the canvas.

expression.CanvasCropBottom(Increment)

expression   Required. An expression that returns one of the objects in the Applies to list.

Increment  Required Single. The amount in percentage points of a canvas's height that you want remaining after the canvas is cropped. Entering 0.9 as the increment crops ten percent of the canvas's height from the top. Entering 0.1 crops ninety percent of the canvas's height from the top.

Remark

Use the CanvasCropBottom method to crop from the bottom.

Example

This example crops twenty-five percent of the drawing canvas's height from the top of the first canvas in the active document, assuming the first shape in the active document is a drawing canvas. If not, you will need to add a drawing canvas to the document using the AddCanvas method.

Sub CropCanvasTop()
    Dim shpCanvas As Shape

    Set shpCanvas = ActiveDocument.Shapes(1)
    shpCanvas.CanvasCropTop Increment:=0.75
End Sub