There is a really great article at SysCon CFDJ which addresses this topic
but the premise is really easy.
http://coldfusion.sys-con.com/read/41604_p.htm

<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>

<!--- Tell the browser you are serving up a Word Document --->
<cfheader name="Content-Type" value="application/msword">
<!--- Create a filename for the document and set it as an attachment so it
doesn't try to render inline' --->
<cfheader name="Content-Disposition" value="attachment; filename=
yourfilenamehere.doc">

Voila!

On 5/4/06, Jim Wright <[EMAIL PROTECTED]> wrote:
>
> > Is this what you mean?  If so, then yes it works.
> >
> > <br clear=all style='page-break-before:always'>
>
> Good to know...I guess word is better at importing html than it is at
> exporting.
>
> --
> Jim Wright
> Wright Business Solutions
> [EMAIL PROTECTED]
> 919-417-2257
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239497
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to