Gets an ILineFormat interface that contains line formatting properties for the specified shape.
[Visual Basic] Property ReadOnly Line As ILineFormat [C#] ILineFormat Line { get; } [C++] __property ILineFormat* get_Line(); [JScript] function get Line() : ILineFormat
This example sets the border around the shape.
[C#]
IWorksheet sheet = book.Worksheets[1];
sheet.Cells[1,1].Select();
IShape shape = sheet.Shapes.AddPicture("image.jpg");
shape.Line.Style = MsoLineStyle.msoLineThinThick;
shape.Line.Weight = 4.5;
shape.Line.Visible = true;
shape.Line.ForeColor.RGB = System.Drawing.Color.FromArgb(0x0000FF);
shape.Line.BackColor.RGB = System.Drawing.Color.FromArgb(0x0000FF);
[Visual Basic]
Dim sheet As IWorksheet = book.Worksheets(1)
sheet.Cells(1,1).Select()
Dim shape As IShape = sheet.Shapes.AddPicture("image.jpg")
shape.Line.Style = MsoLineStyle.msoLineThinThick
shape.Line.Weight = 4.5
shape.Line.Visible = True
shape.Line.ForeColor.RGB = System.Drawing.Color.FromArgb(&H0000FF)
shape.Line.BackColor.RGB = System.Drawing.Color.FromArgb(&H0000FF)
[C++]
IWorksheet* sheet = book->Worksheets->Item[1];
sheet->Cells->Item[1,1]->Select();
IShape* shape = sheet->Shapes->AddPicture(S"image.jpg");
shape->Line->Style = MsoLineStyle::msoLineThinThick;
shape->Line->Weight = 4.5;
shape->Line->Visible = true;
shape->Line->ForeColor->RGB = System::Drawing::Color::FromArgb(0x0000FF);
shape->Line->BackColor->RGB = System::Drawing::Color::FromArgb(0x0000FF);
IShape Interface | NativeExcel Namespace