Hello,
Here's what I'm doing. I've put my resume online and I want people to select
"save view as word document" and have them save that current view as a word
or rtf.
Now I've gotten this to work however I've run into a snag, when it comes to
listing my jobs, it only lists the first job. I'm not sure why it does but
it does.
I tried a loop (just simply using cfloop query etc...) but that didn't work.
I do have 1 more thing to figure out, is there a way to delete bullets
inside the rtf document because I don't want to have a blank bullet with
nothing behind it.
I'll post my code below.
<CFQUERY DATASOURCE="#DSN#" Name="List">
Select *
FROM Jobs
WHERE jbType = '#Type1#' OR jbType = '#Type2#'
ORDER BY jbStart #Order#
</cfquery>
<!--- Location of our RTF "template" document --->
<CFSET ThisFolder = GetDirectoryFromPath(GetCurrentTemplatePath())>
<CFSET TemplatePath = ThisFolder & "Template1.rtf">
<!--- Read RTF template into variable called "RTF" --->
<CFFILE
ACTION="Read"
FILE="#TemplatePath#"
VARIABLE="RTF">
<!--- Replace "placeholders" with specific information --->
<CFSET RTF = Replace(RTF, "%jbTitle%", List.jbTitle)>
<CFSET RTF = Replace(RTF, "%jbCompany%", List.jbCompany)>
<CFSET RTF = Replace(RTF, "%jbStart%", DateFormat((List.jbStart), "mmmm d,
yyyy"))>
<CFSET RTF = Replace(RTF, "%jbEnd%", DateFormat((List.jbEnd), "mmmm d,
yyyy"))>
<CFSET RTF = Replace(RTF, "%jbAddress%", List.jbAddress)>
<CFSET RTF = Replace(RTF, "%jbPoint1%", List.jbPoint1)>
<CFSET RTF = Replace(RTF, "%jbPoint2%", List.jbPoint2)>
<CFSET RTF = Replace(RTF, "%jbPoint3%", List.jbPoint3)>
<CFSET RTF = Replace(RTF, "%jbPoint4%", List.jbPoint4)>
<CFSET RTF = Replace(RTF, "%jbPoint5%", List.jbPoint5)>
<CFSET RTF = Replace(RTF, "%jbPoint6%", List.jbPoint6)>
<CFSET RTF = Replace(RTF, "%jbPoint7%", List.jbPoint7)>
<CFSET RTF = Replace(RTF, "%jbPoint9%", List.jbPoint8)>
<CFSET RTF = Replace(RTF, "%jbPoint8%", List.jbPoint9)>
<!--- Suggest default filename for document --->
<CFHEADER NAME="Content-Disposition" VALUE="filename=Template2.rtf">
<!--- Set the content-type so Word is invoked --->
<CFCONTENT TYPE="application/msword"><CFOUTPUT>#RTF#</CFOUTPUT>
--------------------------------------
Mark Smeets / stranger0 / ICQ: 1062196
[EMAIL PROTECTED]
http://www.prowerks.com/stranger
"Life is a series of small victories" - Gene Simmons
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists