Question: How can I add a colored border to a cell in C# Excel VSTO?

I found the API via the following link, and there're some descriptions regarding adding borders, but not very specific. The weird thing is VS2010 doesn't recognize `BorderAround()` method. It seems to only recognize `BorderAround2()`, but complaining the arguments I put int.

Below is the code that I tried, but VS complains about the invalid arguments. 

```
range.BorderAround2(Excel.XlLineStyle.xlDash, Type.Missing, Type.Missing, System.Drawing.Color.Red, Type.Missing);

```

<http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.range.borderaround(v=office.14).aspx>

Answer: 
My own approach is similar to what idssl suggested, but utilizing [ColorTranslator.ToOle](http://msdn.microsoft.com/en-us/library/system.drawing.colortranslator.toole.aspx) method.

```
range.Borders.LineStyle = Excel.XlLineStyle.xlDot;
range.Borders.Color = ColorTranslator.ToOle(Color.Red);

```

Which also works for me.
You should see here

<http://www.aspose.com/docs/display/cellsnet/Add+Borders+to+Cells+in+a+Worksheet>

With 

```
//Set the borders with hair lines style.
_range.SetOutlineBorders( CellBorderType.Hair, Color.Black);

```