1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
'Here Is a very minimalistic script which will Set the footer To "Data: "
'followed by the Name of the current data file.  It Is Not automatic:  you
'will have To run it at some point prior To printing the Output document, And
'If different data files were Open before Or another file Is opened after you
'run the script, the footer will Not reflect that.  But you can just Put a
'button On your toolbar For the script, And run it again.

'------ save the following As "DataFooter.sbs" ---------------

Sub Main
        Dim strFile As String
        On Error Resume Next

        With objSpssApp
                strFile = .Documents.GetDataDoc(0).GetDocumentPath
                .GetDesignatedOutputDoc.PrintOptions.FooterText = "Data: " & strFile
        End With
End Sub