首页 > 其他 > 详细

2014.10.1 Word技巧

时间:2016-10-15 19:22:02      阅读:334      评论:0      收藏:0      [点我收藏+]

设置每页都出现的表头

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;//

2014.10.1 Word技巧

原文:http://www.cnblogs.com/mol1995/p/5964796.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!