Use the following syntax to test this autoscript: Bold Total In SUMMARIZE table Or Insert Page Break (initiating syntax).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Sub Summarize_Table_Report_Create(objTable As Object, objOutputDoc As Object, lngIndex As Long)
'Autoscript
'Trigger Event: Report Table Creation after running Summarize procedure.

'Effects: Goes through the Row Labels and finds "Total" rows and turns "Total" and
'associated data cells bold if the title begins with "/bold/"
' if the title begins with /break/ then a Page Break is inserted immediately before the Summarize table.
' If you want to use both /break/ and /bold/ you need to start the title by "/break//bold/"

'Author: Raynald Levesque 2004/02/03

	Dim bolSelection As Boolean
	Dim i As Integer
	Dim objitem As ISpssItem

	Set objitem = objOutputDoc.Items.GetItem(lngIndex)

	With objitem
		If (Left(.Label,7) = "/break/") Then
			objitem.PageBreak =True
			.Label = Mid(.Label, 8)
			objTable.TitleText = Mid(objTable.TitleText, 8)
		End If
		If (Left(.Label,6) = "/bold/") Then
			Call SelectRowLabelsAndData(objTable, "Total", bolSelection)
			If bolSelection = True Then
					objTable.TextStyle = SpssTSBold
			End If
			.Label = Mid(.Label, 7)
			objTable.TitleText = Mid(objTable.TitleText, 7)
		End If
		.Activate
		.Deactivate
	End With
	Set objitem = Nothing
End Sub