> -----Original Message-----
> From: George Linderman [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 01, 2007 7:05 PM
> To: CF-Talk
> Subject: Inserting data into a word document
> 
> Hey guys,
> 
> 
> Well, I'm presented with a problem here. My client needs me to create a
> form, where the user will input the information, and then that
> information goes to a database. All fair and simple, but then he wants
> to be able to hit a button, and this data will magically go into a word
> document that has a specific format and layout that I can't create
> through CSS/HTML. Anyway, I need to get data from a database/form into
> a word document. Any ideas?

Lots - Word is AMAZINGLY accessible.  You can use the COM interface to do
just about anything.  A huge amount of "how-to" information is here:

http://msdn2.microsoft.com/en-us/library/kw65a0we(VS.80).aspx

Pretty much anything you can't do directly from CF with those interfaces you
should be able to do with Visual Basic for Applications scripts (you can
also do most of this ).

My suggestion would be to create your template as a Word Form (using
predefined form fields).  It should be easier to access named form fields
programmatically than to insert blocks of text (although you can do the
latter as well).

It usually means installing Word on your server (something a lot of security
experts would warn against) which, of course, means a Windows server. In
this you're going to be at a disadvantage if you're on Unix but even then I
think there's options.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289879
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to