DocX icon indicating copy to clipboard operation
DocX copied to clipboard

Excuse me, this support Word before 2003 and 2003(doc).

Open SunShine-ever opened this issue 5 years ago • 2 comments

SunShine-ever avatar Dec 19 '19 02:12 SunShine-ever

string fileName = AppDomain.CurrentDomain.BaseDirectory + "5.doc"; if (!File.Exists(fileName)) { File.Create(fileName).Close() using (var document = DocX.Create(fileName)) { //创建一个1行3列的表格 var table = document.AddTable(3, 3); table.Design = TableDesign.LightList;//边框 table.Alignment = Alignment.center; table.SetWidths(); table.Rows[0].Cells[0].Paragraphs[0].Append("字体名称"); table.Rows[0].Cells[1].Paragraphs[0].Append("字体效果"); table.Rows[0].Cells[2].Paragraphs[0].Append("字体厂商"); var p1 = document.InsertParagraph(); p1.InsertTableAfterSelf(table); // 保存当前文档 document.Save(); } return true; } create a word97-2003 style doc file not a docx

TruePluto avatar Mar 29 '20 12:03 TruePluto

Hi, It could work to create "doc" file, but this product is made to work with "docx" files format(2007 and up). Thank you.

XceedBoucherS avatar Mar 30 '20 11:03 XceedBoucherS