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
37
38
'Begin Description
'This script empties the designated output document 
'Requirements: A Designated Output doc must exist 
'  It is very convenient to "attach" this script to a button on the tool bar
'  A simple clik on the button clears the Output window
'End Description

Option Explicit		

Sub Main()
'SCRIPT TO EMPTY DESIGNATED OUTPUT WINDOW
            
	Dim objOutputDoc As ISpssOutputDoc
	Dim objItems As ISpssItems
	Dim objItem As ISpssItem
	On Error Resume Next
    Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc   
	Set objItems = objOutputDoc.Items			

	Set objItem = objItems.GetItem(0)
	'Select all items        
    objItem.Current = True
    objItem.Selected = True
    objOutputDoc.Remove
			   
End Sub

Sub version2()

	Dim objOutputDoc As ISpssOutputDoc
	Set objOutputDoc=objSpssApp.GetDesignatedOutputDoc

' Select all items in the output document and delete them :

	objOutputDoc.SelectAll
	objOutputDoc.Delete
	
End Sub