InsetPen Property

       

Returns or sets an MsoTriState constant indicating whether a specified shape's lines are drawn inside its boundaries. Read/write.

MsoTriState can be one of these MsoTriState constants.
msoCTrue  Not supported.
msoFalse  Lines are drawn directly on the specified shape's boundaries.
msoTriStateMixed  Return value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggle  Set value which toggles between msoTrue and msoFalse.
msoTrue  default  Lines are drawn inside the specified shape's boundaries.

expression.InsetPen

expression   Required. An expression that returns a LineFormat object.

Remarks

An error occurs if you attempt to set this property to msoTrue for any Microsoft Office AutoShape which does not support inset pen drawing.

The value of the InsetPen property for tables is always msoTrue; attempting to set the property to any other value results in an error.

Example

The following example adds two rectangles to page one of the active publication, the first with its lines drawn inside its boundaries, and the second with its lines drawn on its boundaries.

Dim shpNew As Shape

With ActiveDocument.Pages(1).Shapes
    Set shpNew = .AddShape(Type:=msoShapeRectangle, _
        Left:=200, Top:=150, Width:=150, Height:=100)
    With shpNew.Line
        .Weight = 24
        .InsetPen = msoTrue
    End With

    Set shpNew = .AddShape(Type:=msoShapeRectangle, _
        Left:=200, Top:=300, Width:=150, Height:=100)
    With shpNew.Line
        .Weight = 24
        .InsetPen = msoFalse
    End With
End With