// LineWidth property  ets the border width in points. 
builder.Font.Border.LineWidth = 0.5d;
// LineStyle specifies line style of a Border. 
builder.Font.Border.LineStyle = LineStyle.DashDotStroker;
// Call Size property to set the size of the font. 
builder.Font.Size = 16;
// Name property is used to set the name of the font. 
builder.Font.Name = "Arial";
// Make your text bold by calling Bold property 
builder.Font.Bold = true;
builder.Write("Text surrounded by border.");
builder.Writeln();
// call the save method to save the MS Word file
doc.Save("./output.docx");