'BEGIN DESCRIPTION 'This script assumes that objSpssApp ist the currently running 'SPSS-Application and assigns every existing Pivot Table 'in the Output Navigator a new TableLook which can be selected 'from a Dialog box. Hidden tables will also be affected. 'Created by SPSS Germany. Author: Arnd Winter. 'END DESCRIPTION 'German description 'Dieses Skript setzt voraus, daЯ objSpssApp die gegenwдrtig 'ausgefьhrte SPSS-Anwendung ist und weist allen vorhandenen Tabellen 'im Ouput-Navigator nachtrдglich eine 'neue Tabellenansicht zu, die per Dialogbox ausgewдhlt wird. 'Auch nicht eingeblendete, aber vorhandene Tabellen werden verдndert. 'Erstellt von SPSS GmbH Software, Mьnchen, Deutschland. 'Autor: Arnd Winter Sub Main On Error GoTo Bye ' Variable Declaration / Deklarieren von Variablen Dim objOutputDoc As ISpssOutputDoc Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc Dim strAppPath As String Dim objOutputItems As ISpssItems Dim objOutputItem As ISpssItem Dim objPivotTable As PivotTable Dim intCount As Integer Dim varStrLook As String Set objOutputItems=objOutputDoc.Items ' Find out SPSS Directory / SPSS-Verzeichnis ermitteln strAppPath = objSpssApp.GetSPSSPath ' Select TableLook / Tabellenansicht auswдhlen ' For German version activate first line instead of second 'VarStrLook = GetFilePath$("*.tlo","tlo",strAppPath,"Bitte Tabellenansicht auswдhlen und mit Speichern bestдtigen",4) VarStrLook = GetFilePath$("*.tlo","tlo",strAppPath,"Select TableLook and confirm with Save",4) ' If Cancel selected or wrong file type then exit script ' Wenn abbrechen gedrьckt oder falsche Datei gewдhlt, Programm verlassen If (Len(varStrLook)= 0) Or (Right(varStrLook,3)<>"tlo") Then Exit Sub End If ' Loop which assigns a new TableLook to all existing Tables. ' Schleife, die alle Tabellen im Output Navigator aktiviert und ' die ausgewдhlte Tabellenansicht zuweist intCount = objOutputItems.Count For I = 0 To intCount-1 Set objOutputItem=objOutputItems.GetItem(I) If objOutputItem.SPSSType=SPSSPivot Then Set objPivotTable=objOutputItem.ActivateTable objPivotTable.TableLook = varStrLook objOutputItem.Deactivate End If Next Bye: End Sub