[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 449
  • Last Modified:

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">
	FROM master14
<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 #trim(Account__bType)# IS "Company__bAgency">
	<a href="http://ourserver/FootprintsWMG/CompanyReport.cfm?MRID=#FPMRID#" target="_blank">Company Management Agency</a> 
<a href="http://ourserver/FootprintsWMG/ThisReport.cfm?MRID=#FPMRID#" target="_blank">This Report</a> 

Open in new window

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now