在Coldfusion中创建Word文档 - 如何进行分页编号?

Sau*_*aul 9 coldfusion ms-word wordml wordprocessingml

我正在使用以下代码创建Word格式.doc,然后使用cfheader和cfcontent来提供服务.一切都很好,但我需要能够在页眉(或页脚)中放置动态信息,否则自动页面编号将是第二个最佳选择.

我该如何修改代码?

<cfsavecontent variable="myDocument">
<html xmlns:w="urn:schemas-microsoft-com:office:word">
<!--- Head tag instructs Word to start up a certain way, specifically in
print view. --->
    <head>
        <xml>
         <w:WordDocument>
            <w:View>Print</w:View>
            <w:SpellingState>Clean</w:SpellingState>
            <w:GrammarState>Clean</w:GrammarState>
            <w:Compatibility>
             <w:BreakWrappedTables/>
             <w:SnapToGridInCell/>
             <w:WrapTextWithPunct/>
             <w:UseAsianBreakRules/>
            </w:Compatibility>
            <w:DoNotOptimizeForBrowser/>
         </w:WordDocument>
        </xml>
    </head>
<body>
    Regular HTML document goes here
    <!--- Create a page break microsoft style (took hours to find this) 
--->
    <br clear="all"
style="page-break-before:always;mso-break-type:page-break" />
    Next page goes here
</body>
</html>
</cfsavecontent> 
Run Code Online (Sandbox Code Playgroud)

Sel*_*glu 4

请看一下:页眉和页脚 我已经使用本文成功创建了仅使用一个 html 文件的自定义页眉和页脚。(字2003)

希望这可以帮助!