Insert Sql data into word or pdf document

I have users that have word documents that are edited - they want to insert data from an sql database - they will run different reports based on some of the criteria from the database - I am going to output the list of reports available using coldfusion.  Is there a way to open a word or pdf document and passing the data fields needed - so they can still edit their word document and it will put the data in the correct spots?
<cfset FPMRID = #url.MRID#>
<cfquery name = "ClientInfo" datasource = "ThisDatasource">
	SELECT *
	FROM master14
	WHERE MRID = #FPMRID#;
</cfquery>
<cfoutput query="ClientInfo">
<cfif #trim(Account__bType)# IS "Individual__fJoint__bAgency">
	<a href="http://ourserver/FootprintsWMG/JointReport.cfm?MRID=#FPMRID#" target="_blank">Joint Management Agency</a> 
</cfif>
<cfif #trim(Account__bType)# IS "Company__bAgency">
	<a href="http://ourserver/FootprintsWMG/CompanyReport.cfm?MRID=#FPMRID#" target="_blank">Company Management Agency</a> 
</cfif>    
<a href="http://ourserver/FootprintsWMG/ThisReport.cfm?MRID=#FPMRID#" target="_blank">This Report</a> 
</cfoutput>

Open in new window

htlfAsked:
Who is Participating?
 
Jones911Commented:
Good luck editing word docs its not fun at all but PDF's here is a good start:  http://www.coldfusionjedi.com/index.cfm/2007/7/9/ColdFusion-8-Working-with-PDFs-Part-1

this may also help you with CF-> Word:  http://www.coldfusionjedi.com/index.cfm/2009/2/4/Reading-Office-documents-with-ColdFusion
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.