把上图红色字体居中设置大小粗体,其余的不变,请各位大侠指点
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document document = wordApp.Documents.Add(ref none, ref none, ref none, ref none);
wordApp.Application.Selection.Font.Size=40;//用这句话设置字体,使整个文档的字体都是40
wordApp.Application.Selection.ParagraphFormat.Alignment=WdParagraphAlignment.wdAlignParagraphCenter;
wordApp.Application.Selection.TypeText(deviceName + "参数
设置");
wordApp.Application.Selection.TypeParagraph();
Table table1 = document.Tables.Add(document.Paragraphs.Last.Range, 36, 6, ref none, ref none);
table1.Range.ParagraphFormat.Alignment = WdParagraphAlignment.wdAlignParagraphThaiJustify;//设置对其方式
table1.Borders.InsideLineStyle = WdLineStyle.wdLineStyleSingle;//设置表格边框样式
table1.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleSingle;//设置表格边框样式