SQL Object
 
Syntax
 
SQL.RunMSWord ViewOrTableOrQuery [, SaveAs][, TimeOut]
 
Description
Opens a VIEW, TABLE or a SELECT query, and presents the data in the Microsoft program Word through a new and completely automatically formatted Word document.
 
The output is similar to the output option: "Word document" in the SQL Designer
 
Parameter
Description
ViewOrTableOrQuery
A reference to a View, Table or Select query.
SaveAs
Optional. If a valid path and file name are entered here, the document is not opened, but saved directly to SaveAs.
TimeOut
Optional. Specifies the maximum wait time in seconds for the query. If the result does not appear within the specified time, the query is aborted and an error message is generated. Default value: 30 seconds.
 
See Also
other SQL.Runxxxxxxxx methodes, Word-document.
Example
 
Sub Main
 
   Dim sQuery As String
 
   sQuery = InputBox$("Select Query:")
   SQL.RunMSWord sQuery, , "Demo!"
 
End Sub