码迷,mamicode.com
首页 > 其他好文 > 详细

2014.10.1 Word技巧

时间:2016-10-15 19:22:31      阅读:110      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!