> I'm presuming the list is back in action. Basically I've got
> a question about outputting to a .doc or .rtf file a fairly
> straightforward report.
>
> I know I can use
> <CFCONTENT TYPE="application/msword">
> <CFHEADER NAME="content-disposition" VALUE="filename=File.DOC">
>
> Like Eron mentioned, but what do I need to do with the actual
> template file? Just insert my CF variables as if in a cfm template?

With RTF, which is made up of ASCII text, you can just insert the CFML tags,
functions, and expressions you want to use. Here's an example:

<CFQUERY NAME="MyQuery" ...>
...
</CFQUERY>

<CFHEADER NAME="Content-disposition" VALUE="inline; filename=payme.rtf">
<CFCONTENT
TYPE="application/msword">{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl
{\f0\fswiss\fcharset0 Arial;}}
\viewkind4\uc1\pard\f0\fs20 Hi, <CFOUTPUT>#MyQuery.UserName#</CFOUTPUT>!\par
\par
You now owe $<CFOUTPUT>#MyQuery.CurrentDebt#</CFOUTPUT>. Please pay at once,
or we'll break your legs.\par
}

Note that the line directly preceding the RTF text is the CFCONTENT tag. For
more info about using RTF with CF, you can take a look at this:

http://www.figleaf.com/figleafhome/cfug/cfugjune00.zip

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to