Downloading data from SQL server to Word Docs

  • Here's what we are trying to do: We need to link data that will be entered by the users to the SQL server on to already existing Word Document Templates, so the user can enter the data and the system will produce the document. Has anyone done this or attempted to do this, and how did you do it? Thanks in advance.

  • I haven't tried it yet, know we have a project where we're considering something similar. Seems like it would be doable, use form fields in the template, then based on the data entry run a query to get the data and just do the mapping to the form fields. Might be easier to put it in a form in Word, or even a simple VB form that would run Word via automation.

    Another option - well, really the same just done a little differently, is look at the mail merge functionality. Gives you a fairly point and click interface.

    A lot depends on how rich the template needs to be - if it's relatively simple you might look at just building the doc as HTML - easy to manipulate from VB/Access/Whatever and you can do the same type of merge.

    Andy

  • Haven't tried it, but do you really need word? RTF, HTML, numerous other "template" formats would be easier to manipulate.

    Steve Jones

    steve@dkranch.net

  • We do have to use Word docs, because the Word Templates are already finished and number in the hundreds (600+ at my last count).

  • Pretty cool. So are they true templates using form fields, or some custom data marker? Planning to complete each from within Word/the document?

    Andy

  • If you are stuck with Word, I would think you could use automation and scripting to do this. I'd tackle one in a .vbs file first and then work on perhaps scheduling this using DTS and Active X later. If you have a sample that you can disclose, send it to me (steve@dkranch.net) and I'll mess with it a little.

    Steve Jones

    steve@dkranch.net

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply