【发布时间】:2012-03-09 13:51:36
【问题描述】:
我在第一页生成带有标题的“Word 文档”作为 HTML 代码。 <style>
标签包含:
@page Section {
size:8.5in 11.0in;
margin: 0.7in 0.9in 0.7in 0.9in;
mso-header-margin: 0.0in;
mso-footer-margin: 0.0in;
mso-title-page: yes;
mso-first-header: fh1;
mso-paper-source: 0;
}
div.Section {
page: Section;
}
和<body>:
<div class="Section" style="font-family: Verdana, sans-serif;">
<![if supportFields]>
<div style="mso-element:header" id="fh1">
<p class="MsoHeader">
header
</p>
</div>
<![endif]>
</div>
它在标题和文档的主体中显示“标题”文本。我发现的资源(http://techsynapse.blogspot.com/2007/03/generating-word-document-dynamically.html 和http://www.pbdr.com/ostips/wordfoot.htm)说如果不使用额外的头文件就无法避免这种影响这不是我的选择。
我的问题是:您知道该问题的任何解决方法吗?如何隐藏主文档中标题的出现,但将其保留在页面顶部的位置?提前感谢您的任何建议。
【问题讨论】:
标签: html header ms-word ms-office footer