I have done this in the past using RTF format. About 1/2 way into it I wish I hadn't. It can be very tedious for large forms. You can try saving the document in .xml format but Word's XML parser is VERY picky and I never got it to work right. Hence the RTF approach.
Basically I saved the document as RTF with markers where the variables would go and filled it in with CF variables and forced it to be downloaded as a .doc file <cfsavecontent variable="MyDoc"> <cfinclude template="../GoalsObjectivesPrint.txt"> </cfsavecontent> <cfheader name="Content-Disposition" value="attachment; filename=grothplan.doc"> <cfcontent type="application/unknown"><cfoutput>#Trim(MyDoc)#</cfoutput><cfsetting showdebugoutput="false"> HTH, G! On Thu, Feb 4, 2010 at 2:36 AM, Arsalan Tariq Keen <arsalk...@hotmail.com>wrote: > > Dear Experts, > > I want to know is there any way I can auto-fill my word documents with > specific data at specific locations using ColdFusion. I have done this using > PDF Forms, where I used to add texfields and then later populate them using > CF. Is there anyway to achieve this using CF + MS-Word???? > > > Regards, > Arsalan > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330401 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4