Table of contents
Collapse the table of content
Expand the table of content

LineFormat.InsetPen Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

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


expression. InsetPen

_expression_A variable that represents an LineFormat object.

Return Value



An error occurs if you attempt to set this property to msoTrue for any Microsoft Office AutoShape that 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.

The InsetPen property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

msoFalseLines are drawn directly on the specified shape's boundaries.
msoTriStateMixedReturn value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggleSet value that switches between msoTrue and msoFalse.
msoTrueLines are drawn inside the specified shape's boundaries.


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
© 2018 Microsoft