HotXLS Docs

Style property

Represents the style of the line. Read/write TmsoLineStyle.

Syntax

property Style: TmsoLineStyle;

Description

Style can be one of these TmsoLineStyle constants.
msoLineSingle
msoLineThinThin
msoLineThickThin
msoLineThinThick
msoLineThickBetweenThin

Example

This example creates new comment on cell B2 with double red border

With Workbook.Sheets[1] do begin
  With Range['B2', 'B2'].AddComment('Comment text') do begin
    Shape.Line.Style := msoLineThinThin;
    Shape.Line.Weight    := 2.25;
    Shape.Line.ForeColor.RGB := $0000FF;
  end;
end;
This example adds new picture into sheet one with single black border

With Workbook.Sheets[1] do begin
  Cells[2,2].Select;
  With Shapes.AddPicture('image1.jpg') do begin
    Line.Style := msoLineSingle;
    Line.Weight    := 0.25;
    Line.ForeColor.RGB := $000000;
    Line.Visible := true;
  end;
end;