2011-11-03 63 views
0

我正在生成word文檔。但在最後一頁頁腳顯示在身體和頁腳。我正在使用代碼給出波紋管頁腳在最後一頁在體內重複

<apex:page standardController="opportunity" extensions="BES_Quote_DOC" contentType="application/msWord" cache="true" standardStylesheets="false"> 

<head> 
<style> 
@page {mso-footer:f1;} 
div.Section1{page:Section1;} 

p.MsoFooter, li.MsoFooter, div.MsoFooter{ 
mso-pagination:widow-orphan; 
tab-stops:center 216.0pt right 432.0pt;} 

</style> 
</head> 

<body> 
<div class="Section1"> 
    <apex:form id="hidDiv"> 
    <table> 
    <tr> 
     <td>abcd</td> 
     <td>efgh</td> 
    </tr> 
    <tr> 
     <td>ijkl</td> 
     <td>mnop</td> 
    </tr> 
    <tr> 
     <td>qrst</td> 
     <td>uvwx</td> 
    </tr> 
    </table> 
    </apex:form> 


    <div style="mso-element:footer" id="f1"> 
     <p class='MsoFooter' align="left" style="font-size: 10px">this is footer</p> 
    </div> 
</div> 
    </body> 

</apex:page> 

我不想在身體的頁腳。我該怎麼辦。

謝謝。

回答

1

我猜你得到了這段代碼並直接嵌入到你的文件中。頁眉和頁腳應放置在單獨的文件中。這個鏈接使我更加了解如何放置頁眉和頁腳。 [http://sebsauvage.net/wiki/doku.php?id=word_document_generation] [1]