Insert Sql data into word or pdf document

Posted on 2009-02-09
Last Modified: 2013-12-24
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

Question by:htlf
    1 Comment
    LVL 19

    Accepted Solution

    Good luck editing word docs its not fun at all but PDF's here is a good start:

    this may also help you with CF-> Word:

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Mail Merge with expanding table 16 47
    JKS to store upstart data 2 53
    Mail Merge/EMail 10 46
    Numerous files can not be opened anymore 17 46
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
    The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now