//</Snippet1> //--------------------------------------------------------------------- //<Snippet2> static void SetHeadings(Microsoft.Office.Interop.Word.Cell tblCell, string text) { tblCell.Range.Text = text; tblCell.Range.Font.Bold = 1; tblCell.Range.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphCenter; }
}//end private string FormatText(Microsoft.Office.Interop.Word.Cell cell) { string res = cell.Range.Text.Trim(); return (res.Contains("\r") ? res.Remove(res.IndexOf("\r")) : res.Remove(res.IndexOf("\a"))); }//end