2

I would like to fill in a Microsoft Word document using a SQL Server database, preferably without doing the document processing on the server side.

From what I read, Microsoft does not recommend server side word processing as it was not designed to be scalable, the UI will come up and there would be no one to click it, and licensing issues.

Therefore I would be interested in a way that a client could type up a Word document and then put something like Name: <!name> and then connect somehow through a web service to receive a record set or something that will fill in all the tags with the information from the database.

How would I go about doing this? If this is not possible, is there any way a client can design the form they want to use, and have our program fill in the template fields?

If Word cannot do it, can Open Office?

Thank you.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
SolidSnake4444
  • 3,372
  • 6
  • 40
  • 63
  • Microsoft InfoPath is designed to do this type of thing more than Word. –  Oct 18 '12 at 17:38
  • True, the issue is we can't tell all of our clients to go out and pay big money to just use this. Word is almost standard to all our clients and open office can make .docx files. – SolidSnake4444 Oct 18 '12 at 18:53
  • Excel might be something to look at as it allows you to make a connection to a database. I have not used it in the manner you are talking about though. –  Oct 18 '12 at 21:06
  • I suggest you have a look at Eric White's blog articles (a good starting point is here: http://ericwhite.com/blog/toc-expanded ). A lot of these are in the general area you are concerned with, and I notice he also has material about Web Services. The DocumentBuilder, DOCX generation and content controls areas are probably the best places to begin. –  Oct 21 '12 at 14:39

1 Answers1

2

With OpenOffice, this is at least as hard as with Microsoft Office. Unless you are more experienced with OpenOffice development than with Microsoft Office. I find it very hard to gather technical documentation on OpenOffice customization development, while Microsoft does it best to attract developers.

If you like to pre-fill a Word document with data from SQL Server or for instance Teradata on a PC using Microsoft Office, I can recommend you Invantive Composition for filling Word documents from the database (please note that I've been involved with that product). You can extend it further using C#, but out-of-the-box it is already able to connect to various database platforms through a webservice. I think it can also connect directly to SQL databases, but that requires maintenance on local database drivers.

Please note that Invantive Composition is preliminary aimed at non-developers; a financial or legal employee with high school or university must be able to create templates for the rest of their collegeaus. Of course, IT and security department still need to make sure only the data that should be available on a need-to-know-basis is made available. That can be done on the central webservice or using a separate database or separate database views.

Guido Leenders
  • 4,232
  • 1
  • 23
  • 43