RE: Outputting to .doc or rtf files

2000-06-19 Thread Dave Watts

 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=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Outputting to .doc or rtf files

2000-06-15 Thread Dave Wilson

Hi all,

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?

Any help appreciated,

Dave Wilson
Internet Technology Manager,
BizNet Solutions

Allaire Premier Partner
Co-Founder CFUG Ireland
http://www.cfug.ie

224, Lisburn Road
Belfast BT9 6GE

Tel: 02890 225 776
Fax: 02890 223 223
web: http://www.biznet-solutions.com

email: [EMAIL PROTECTED]

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