Output data to a WORD document

  • Hi,

    Does anyone know if you can output data using SSIS into a word document

    I need to use an existing word document and fill in the blanks.

    Any help much appreciated.

    Many thanks

    Pete

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • It would be much more effective to output your data to a file and use Word to do a MERGE document.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Have you got any examples of performing mail merges, can this process be automated? I haven't used mail merge before.

    Thanks

    Pete

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • To explain my users requirement in a bit more detail....

    1) A property has changed status from occupied to available to let

    2) This should trigger a word document to go out to the lettings department for this property with all of the relevant property information filled in. A standard document template should be used.

    All of the above will be scheduled to run daily in batch.

    Hope the above makes sense....

    Regards

    Pete

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • How to automate Word to perform a mail merge from Visual Basic .NET

    You probably could do this in SSIS with the Script Task but that just doesn't seem like the right tool.

    Writing a VB.NET application to automate the merge is something that could be scheduled.

  • Build a report in Reporting Services.

  • I've just found this post .... http://www.simple-talk.com/sql/t-sql-programming/writing-to-word-from-sql-server/

    which seems to use OLE Automation to write to Word.... Has anyone had a go at using this before?

    Pete

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • Once I have built a report in Reporting Services, can this data be automatically exported to Word format?

    Peter Gadsby
    Business Intelligence Consultant
    www.hgconsult.co.uk

  • You may want to look at OfficeWriter for working with Word documents in Reporting Services.

    Officewriter - Reporting Services

    Designing and Delivering Rich Office Reports with SQL Server Reporting Services 2005 and SoftArtisans OfficeWriter

  • Yes, Reporting Services will output to a Word document, Rich Text, pdf, and a couple of other formats.

    It can be tricky to make a really complicated Word document with it, but if your document is not too complex this may be a much easier solution for you to deal with. The previous poster offered a solution if your document is really complicated.

    In addition to outputting to your format, if you are running Enterprise edition of SQL Reporting services, you can use a data-driven subscription to generate the report and email it to the appropriate people.

    If this does not work, I would tend to go the mail-merge direction. You can create a mail merge document pretty easily and even directly access your database data for the merge data. Automating this would be a matter of opening a template with the mail merge set up and finalizing the merge. You can get the code for this by recording a macro while you do these actions in Word - it is not much code.

Viewing 10 posts - 1 through 9 (of 9 total)

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