ert11569etg 2014-08-21 11:09
浏览 1359

delphi导出word,导出的word中设置页码,若首页不显示页码,首页的页头会出现一条横线

这是具体的代码:

Fdoc.Sections.Item(1).Footers.Item(1).PageNumbers.Add(wdAlignRowCenter,true);
Fdoc.Sections.Item(1).Footers.Item(1).PageNumbers.ShowFirstPageNumber:=false;
//以上两行代码是给所有页页脚处设上页码,再将首页页码不显示的
Fdoc.ActiveWindow.ActivePane.View.SeekView := wdseekcurrentpageheader;
Fword.Selection.ParagraphFormat.Borders.Item(wdBordertop).LineStyle := wdLineStyleNone;
Fword.Selection.ParagraphFormat.Borders.Item(wdBorderbottom).LineStyle := wdLineStyleNone;
Fword.Selection.ParagraphFormat.Borders.Item(wdBorderleft).LineStyle := wdLineStyleNone;
Fword.Selection.ParagraphFormat.Borders.Item(wdBorderright).LineStyle := wdLineStyleNone;
//以上四行是讲所有的页眉的横线去掉不显示的

但是保存完word后,再打开后,会发现首页的页眉处会有一条横线,其他页都没有横线的
请问,怎么将该横线去掉啊,我怎么修改代码都不行

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥20 matlab计算中误差
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊