Desktop User Guides > Professional > Table scripting > Exporting tables > Microsoft Word tables export > Microsoft Word tables export properties
 
Microsoft Word tables export properties
Sample script file: WordExport.mrs
This example script is based on the Museum sample data set. See Running the sample table scripts for information on running the example scripts.
When you export tables to Microsoft Word, you can control a number of options using the export properties.
Available export properties
ChartCategoryElements
Set to "Per element" to produce a chart for each category element. Set to "Per variable" to produce a chart for each variable block of category elements. Set to "Per table" to produce a single chart for all category elements in the table.
When using a custom pie chart or template, ChartCategoryElements must be set to "Per element".
Type: String:
"No chart", "Per element", "Per variable", "Per table".
Default value: "Per variable"
ChartCellItem
Where there is more than one cell item on the table, specifies the cell item to chart. The cell item must be included in the table. The cell item must be included in the table. If the specified cell item does not exist then Count will be used, and if Count does not exist, the first cell item is used.
Type: String:
"Count"
"ColPercent"
"RowPercent"
"TotalPercent"
"Mean"
"Sum"
"Minimum"
"Maximum"
"UnweightedCounts"
"CumColPercent"
"CumRowPercent"
"Range"
"Mode"
"Median"
"Percentile"
"StdDev"
"StdErr"
"Variance"
Default value: "ColPercent"
ChartColPropResults
If true, displays the column IDs beside the category labels, and adds the column proportions test results to the chart above the relevant columns.
Type: Boolean
Default value: False
ChartRowsAsSeries
If true, table rows are used to form the chart series. If false, table columns are used.
Type: Boolean
Default value: True
ChartSpecialElements
Set to "Per element" to create a chart for any special statistical elements (mean, standard deviation, etc) in the orientation specified in the ChartRowsAsSeries property. Set to "Per variable" to produce a chart for each variable block of special elements. Set to "Per table" to produce a single chart for all special elements in the table.
Type: String: "No chart", "Per element", "Per variable", "Per table".
Default value: "Per element"
ChartTemplate
Indicates the chart template that is to be used. If you want to use a custom chart template that you have created in Excel, specify the name of the chart template.
Type: String
Default value: "" (Empty string)
ChartTemplateLocation
The location of the chart template. It is not necessary to specify this property because its value is set when the user specifies the chart template file.
Type: String
Default value: "" (Empty string)
ChartType
Indicates the type of chart that is to be created. If you want to use a custom chart that you have created in Excel, specify the name of the custom chart.
Type: String: one of "Clustered Bar", "Stacked Bar", "3D Clustered Bar", "3D Stacked Bar", "Clustered Column", "Stacked Column", "3D Clustered Column", "3D Stacked Column", "3D Column", "Line", "Stacked Line", "Line with Markers", "100% Stacked Line with Markers", "Pie", "3D Pie", "Separated Pie", "3D Separated Pie", "Custom chart name"
Default value: "Clustered Column"
CreateTableOfContents
Determines whether a table of contents is included in the Word document. The table of contents is generated from text formatted using any style based on the Heading styles in Word. In the default template, the Annotation LeftHeader style is based on Word's Heading 1 style, so all text that is formatted in this style is included in the table of contents. This works best when you display the table description (and nothing else) in the left header annotation position. See Changing the headers and footers used in the table of contents for more information.
Type: Boolean
Default value: True
Destination
Location and filename of the exported Word file.
Type: String
Default value: "" (Empty string)
DisplayAnnotations
Determines whether annotations are included in the export. Note that annotations are never exported when you use the Chart Only option.
Type: Boolean
Default value: True
DisplayBorders
Indicates whether tables are to be displayed with borders.
Type: Boolean
Default value: True
DisplayOption
Specifies whether the export should create tables only, charts only, or both tables and charts, and whether the chart or the table should be shown first.
Type: String:
"Table Only"
"Table and Chart"
"Chart and Table"
"Chart Only"
Default value: "Table Only"
DisplayLastCategoryBase
Determines whether to display the base for the last data point in the chart legend. This option is applicable only when charting special elements. If the Count cell item is present, this is used. If not, the Unweighted Count cell item is used.
Type: Boolean
Default value: False
DisplaySeriesBase
Indicates that the base for each of the chart series should be displayed in the legend for the chart.
Type: Boolean
Default value: False
FormatPercentageAxes
Determines whether to chart percentages on a scale of 0 to 100%. If this option is false, the scale is based on the biggest value in the chart.
Type: Boolean
Default value: False
HideApplication
Indicates that Word is to be hidden during the export. This makes the export faster. However, this option is not recommended if you are using Word 2000, because it can lead to the export failing.
Type: Boolean
Default value: False
Interactive
Interactive mode. See Microsoft Word tables export: Interactive mode for more information.
Type: Boolean
Default value: False
LaunchApplication
Launch Word after the export.
Type: Boolean
Default value: False
OverwriteOutput
When not using the interactive mode, this property determines whether an existing output file should be overwritten rather than causing the export to fail. See Microsoft Word tables export: Interactive mode for more information.
Type: Boolean
Default value: False
PrintingPageBreak
Inserts a page break between the tables.
Type: Boolean
Default value: True
RepeatTopAxis
Determines whether the table column headings should be repeated on each page when a table contains more rows than can fit on a single page.
Type: Boolean
Default value: True
TemplateFileName
The name of the Word template (.dot) file to use to format the output.
Type: String
An empty string indicates that the default template should be used.
Default value: "" (Empty string)
UseElementLabels
Determines whether element names or the more friendly element labels are to be used for the row and column labels in the exported tables.
Type: Boolean
Default value: True (Use labels)
UseStyles
Exports styles associated with elements. In the current version, this enables you to export images associated with elements. See Displaying images for elements for more information.
Type: Boolean
Default value: True
UseVariableLabels
Determines whether variable names or the more friendly labels are to be used for variable texts in the exported tables.
Type: Boolean
Default value: True (Use labels)
Example
This example sets five of the export properties and exports two specified tables to a file called MyTables.doc.
With TableDoc.Exports.mrWordExport
  .Properties["Interactive"] = True
  .Properties["LaunchApplication"] = True
  .Properties["PrintingPageBreak"] = False
  .Properties["DisplayOption"] = "Table and Chart"
  .Properties["TemplateFileName"] = "C:\Documents and Settings\afisher\Application Data\Microsoft\Templates\StandardTables.dot"
  .Export("[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\   Output\MyTables.doc", "Table1, Table2" )
End With
Requirements
UNICOM Intelligence Reporter
Microsoft Office 2007 or later
See also
Microsoft Word tables export