标签:
设置每页都出现的表头
wordDoc.Tables[tab].Rows[1].HeadingFormat = (int)Word.WdConstants.wdToggle;
//合并单元格
wordDoc.Tables[tab].Cell(row - dm.antms.Count, 1).Merge(wordDoc.Tables[tab].Cell(row-1, 1));
设置页码
object oAlignment = Word.WdPageNumberAlignment.wdAlignPageNumberCenter;
object oFirstPage = true ;
wordApp.Selection.Sections[1].Footers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers.Add(ref oAlignment,ref oFirstPage);
//去除页眉上的横线
wordApp.ActiveWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekCurrentPageHeader;//定位到页眉
wordApp.Selection.ParagraphFormat. Borders[Word.WdBorderType.wdBorderBottom].LineStyle = Word.WdLineStyle.wdLineStyleNone;//
标签:
原文地址:http://www.cnblogs.com/mol1995/p/5964796.html