The TargetWord object implements the functionality to output data from SQL*XL
to MS Word. The properties of TargetWord determine the way data is output
to Word. To obtain a reference to the targetWord object use the Targets property
of the SQLXL object. Example: SQLXL.Targets( litWord ).Headings = False
Physically, output is generated by the Statement
objects notably the StmtDQL
object that implements select statements. The execute method of the Statement
outputs the data according to the setting of the Target property on the Statement.
If Statement.Target = litWord then output will be generated in Word.
Print column headings
When set to True causes Database rows to be placed
in Table columns.
When set to False causes Database rows to be placed in Table rows.
Query a table and send the output into a MS Word document:
SQLXL.SQL.setText Text:= "select * from dept"
.Headings = True .Transpose= False
Set .Target = Targets( litWord )
Note: Please record all code
through the macro recorder.
Copyright (C) 1995-2014 Linker IT
Software BV. All Rights Reserved. Oracle is a registered trademark of
Oracle corporation. Excel and Office are registered trademarks of
Microsoft corporation. Other names appearing on the site may be trademarks
of their respective owners. Software,
files, documents, articles and other material are provided
"as is" and without warranties as to performance or mechantability or
any other warranties whether expressed or implied. No
warranty of fitness for a particular purpose is offered.