Page 1 of 1

word processed documents and database...

Posted: Tue Sep 15, 2009 7:36 am
by rob1
I have a simple web app that records client details and i have a set of word processed documents (created in word).

I was wondering if there was anyway of combining this information in some kind of way, ideally I would like to have the list of documents within my web app and use these documents as templates.

so if i wanted to send a letter to a client it would automatically pull through their address and reason for contacting them etc (and ability to use any other DB stored piece of information).

documents dont need to necessarily stored within ms word format, but I would need to be able to extract the information and keep the formatting

thanks,

Rob.

Re: word processed documents and database...

Posted: Tue Sep 15, 2009 11:20 am
by Ollie Saunders
To be honest it's probably easier to get Word to look-up the information from the database (via PHP) than it is to create data driven word documents with PHP. You'll have to dig around the Microsoft documentation for your version(s) of Word to see how this is done. My guess is that the worst case scenario (I think) is that you'll have to write some VBA and that newer versions are likely to have simpler ways of doing it.