Weight Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets a Variant indicating the thickness of the specified line or cell border. Read/write.

expression.Weight

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

Remarks

Return values are in points. When setting the property, numeric values are evaluated in points, and strings can be in any units supported by Microsoft Publisher (for example, "2.5 in").

Example

This example adds a green dashed line, two points thick, to the active publication.

  With ActiveDocument.Pages(1).Shapes _
        .AddLine(BeginX:=10, BeginY:=10, _
        EndX:=250, EndY:=250).Line
    .DashStyle = msoLineDashDotDot
    .ForeColor.RGB = RGB(0, 255, 255)
    .Weight = 2
End With