How to automate export query results to Word document?

Microsoft Word is one of the most popular document editor. A lot of people add data from databases to Word document as a table. DTM Query Reporter is a tool that helps users to do that easy. Moreover, it allows to automate this export process by a few simple steps:

DTM Query Reporter: export to MS Word Document sample
  • Provide database connection or select desktop data file.
  • Enter or load query text: statement, script or stored procedure call.
  • Specify output file name for RTF/Word export. The program will create Microsoft Word compatible file.
  • Save project file (.qpr) with these settings.
  • Create command line with saved project file as parameter. The user must provide '-c' switch to run the software in GUI-free mode.
  • Pass this command line to schedule system. For example, Windows Schedule provides AT system command for this purpose.

Download free demo version .

There are optional steps to customize the process:

  • Use SQL file with script instead of immediate query entering.
  • Use 'value file'. It is external file with statement parts, parameters or even whole SQL scripts.
  • Styles modification. The tool allows users to specify style name for report items.
  • Select landscape or portrait mode.

See Also