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
'Rotate Inner Labels of all visible PivotTables.SBS
'Raynald Levesque 2004/08/23
Option Explicit
Sub Main
	Dim objOutputDoc As ISpssOutputDoc
	Dim objOutputItems As ISpssItems
	Dim objOutputItem As ISpssItem
	Dim objPivotTable As PivotTable
	Dim intCount As Integer
	Dim IntItem As Integer

	Dim I As Integer
		Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
		Set objOutputItems=objOutputDoc.Items
		For IntItem = 0 To objOutputItems.Count - 1
			Set objOutputItem = objOutputItems.GetItem (IntItem)
			If objOutputItem.SPSSType = SPSSPivot And objOutputItem.Visible=True  Then
			    Set objPivotTable = objOutputItem.ActivateTable
			    objPivotTable.UpdateScreen=False
				objPivotTable.RotateColumnLabels=True
				objPivotTable.UpdateScreen=True
			    objOutputItem.Deactivate
			End If
		Next IntItem
End Sub