2023-01-12 04:18:25
word里每页页眉不一样怎么设置
若要为文档的一部分创建不同的页眉或页脚 (页眉和页脚,文档必须首先分节 (节:文档的一部分,可在其中设置某些页面格式选项。若要更改例如行编号、列数或页眉和页脚等属性,请创建一个新的节。)。
如果未进行分节,可在希望开始包含不同页眉或页脚的新节的位置插入分节符 (分节符:为表示节的结尾插入的标记。分节符包含节的格式设置元素,例如页边距、页面的方向、页眉和页脚,以及页码的顺序。)。
操作步骤:
1、单击需要插入分节符 的位置。
2、单击“插入”菜单中的“分隔符”命令。
3、在“分节符类型”下,单击说明了所需新节 的开始位置的选项。
4、在想要创建不同页眉或页脚的节内单击鼠标。
5、在“视图”菜单中,单击“页眉和页脚”。
6、在“页眉和页脚”工具栏 中,单击“链接到前一个” 来断开当前节和前一节中页眉和页脚之间的连接。
microsoft word 将不在页眉或页脚的右上角显示“同前”按钮。
更改该节内的原有页眉或页脚,或创建一个新的页眉或页脚。
word里的页眉、页脚写入字后,老是全都变了,这样根本...
页眉和页脚,可以选择应用于整篇文章,本节或是插入点之后。
视图――页眉和页脚,
使页眉处于可修改状态,点击页眉和页脚工具栏上的页面设置,右下方的应用于,选择插入点之后,确定。(这样可以使文章分为多个小节)
并使页眉和页脚工具栏上的同前按钮,处于未选中状态。
试试看,是不是ok了!
word中如何设置文档不同部分页眉页脚内容不同?修改...
private void setheadersfooters(string file)
{
system.object nothing = system.reflection.missing.value;
word.application oapp = new word.application();
oapp.visible = true;
object wordpath = file;
word.document odoc = oapp.documents.open( ref wordpath, ref nothing, ref nothing, ref nothing, ref nothing, ref nothing, ref nothing, ref nothing, ref nothing, ref nothing,ref nothing, ref nothing );
word.section osel = null;
word.range opagestart = null;
int ipage;
int itotalpages;
int isection;
itotalpages = odoc.computestatistics(word.wdstatistic.wdstatisticpages, ref nothing);
//retrieve the headers and footers on each page
isection = 0;
for( ipage = 1; ipage<=itotalpages;++ipage)
{
//go to the page represented by the page number ipage and
//retrieve its section
object which = word.wdgotodirection.wdgotoabsolute;
object what = word.wdgotoitem.wdgotopage;
object count = ipage;
opagestart = odoc.goto( ref what, ref which, ref count, ref nothing);
word.section osec = opagestart.sections.item(1);
//'if this is a different section than the one in the previous
//'iteration and it has a first page header/.footer, then
//'retrieve the first page header/footer for this section.
//'otherwise, retrieve the primary header/footer for this section
if( (isection < osec.index) && (osec.pagesetup.differentfirstpageheaderfooter==1) )
{
//sheader = osec.headers(wdheaderfooterfirstpage).range.text;
osec.headers.item( word.wdheaderfooterindex.wdheaderfooterfirstpage).range.text = string.empty;//可以设置为您的新内容哦
osec.footers.item(word.wdheaderfooterindex.wdheaderfooterfirstpage).range.text = string.empty;//可以设置为您的新内容哦
//sfooter = osec.footers(wdheaderfooterfirstpage).range.text;
}
else
{
//sheader = osec.headers(wdheaderfooterprimary).range.text;
//sfooter = osec.footers(wdheaderfooterprimary).range.text;
osec.headers.item(word.wdheaderfooterindex.wdheaderfooterprimary).range.text = string.empty;//可以设置为您的新内容哦
osec.footers.item(word.wdheaderfooterindex.wdheaderfooterprimary).range.text = string.empty;//可以设置为您的新内容哦
}
isection = osec.index;
}
}