Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameter into MS Word!

Status
Not open for further replies.

micjohnson

Programmer
Nov 9, 2000
86
US
On my ColdFusion application, i have a query which will get me the First name, Last Name, DOB and Address. I have a letter in Ms Word format located as in the folder as same as CFM files(with dahses for Firstname, Lastname, DOB and address like the below)

Letter
------

First Name:___________________

Last Name :___________________

Date of Birth: _______________

Address1:_______________________________________

Address2:_______________________________________

City: _____________________________

Zip: ___________


When i click a button in application, i should open this and i need to pass the above values (from query) into the appropriate columns of the word document.

Is there a way?

Thanks
micj.
 
not sure how you would open a word document and write in specific areas on the page...

You could just save the output to a word.doc file. Bring over table formatting etc. this is a basic example... If you made a .cfm file with this code it would automaticly save the info as a word document and present a download dialog box. Not sure if you need to save these forms on the server....

<cfcontent type="application/msword">
<cfquery datasource="#DSOURCE#" name="count1">
select * from table1
</cfquery>
<table>
<cfoutput query="count1">
<TR>
<TD>#header#</TD><TD>#location#</TD>
</TR>
</cfoutput>
</table>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top