我可以使用mime类型application / msword将页码添加到动态生成的文档中吗?

| 如何使用mime类型application / msword将页码添加到动态生成的文档中?     
已邀请:
是的,您可以在动态生成的文档中添加页码。要获取代码,请在页眉/页脚中打开一个新的文档启用页码,将其保存为单页网页(* .htm),然后在任何文本编辑器(例如记事本)中打开生成的文件  分析代码并采用显示页码的代码。在这里,我试图将页码显示为15之1。这是我从* .htm文件中获得的代码 注意:您可能还需要复制关联的样式。
<style>
 @page Section1
{
    size:11.0in 8.5in;
    mso-footer: url(\"http://images/footer.htm\")f1; 
    mso-header: url(\"http://images/header.htm\")h1;      
    mso-page-orientation:landscape;
    margin:0.3in 0.5in 0.4in 0.5in;
    mso-header-margin:.2in;
    mso-footer-margin:.2in;
    mso-paper-source:0;
    font-family:Gill Sans MT, Times New Roman, Trebuchet MS;
}
div.Section1
{ page:Section1;}
@page Section2
{
    size:11.0in 8.5in; 
    mso-footer: url(\"http://images/footer.htm\")f1; 
    mso-header: url(\"http://images/header2.htm\")h2;         
    mso-page-orientation:landscape;
    margin:0.3in 0.5in 0.4in 0.5in;
    mso-header-margin:.2in;
    mso-footer-margin:.2in;
    mso-paper-source:0;
    font-family:Gill Sans MT, Times New Roman, Trebuchet MS;
}
   </style> 
  ------------- 

  ------=_NextPart_000_0019_01CA5EDF.DC424910
   Content-Type: text/html;
   charset=\"iso-8859-1\"
   Content-Transfer-Encoding: quoted-printable
   Content-Location: http://images/footer.htm

    <!--[if supportFields]>
   <div style=3D\'mso-element:footer;\' id=3D\'f1\'>
  <p class=3D\'MsoFooter\' style=3D\'border:none;mso-border-bottom-alt:solid windowtext    .75pt;padding:0in;mso-padding-alt:0in 0in 1.0pt 0in\'>
   <table border=3D\"0\" width=3D\"100%\" cellpadding=3D\"0\" cellspacing=3D\"0\">
                    <tr>

                        <td width=3D\"25%\" align=3D\"right\"style=3D\"font-family:Gill Sans MT, Times New Roman, Trebuchet MS;font-size:16pt;color:#6cbc48;font-weight:bold;padding:7px 30px 0px 0px;\" valign=3D\"middle\">
                           Page <span style=3D\'**mso-field-code: PAGE**\' ></span> of <span style=3D\'**mso-field-code:NUMPAGES** \'></span>&nbsp;
                        </td>

                </tr>
            </table>
    

要回复问题请先登录注册