Sub Main ' This script pastes the text contained in strSyntaxCommands ' at the end of the Designated Syntax window. ' Raynald Levesque 2002/12/03. Dim objSyntaxDoc As ISpssSyntaxDoc Dim strSynCmd As String Set objSyntaxDoc=objSpssApp.GetDesignatedSyntaxDoc strSynCmd = "My String (first line)" & Chr(13) & Chr(10) strSynCmd = strSynCmd & "second line of syntax" & Chr(13) & Chr(10) ' more lines of syntax strSynCmd = strSynCmd & "last line of syntax" & Chr(13) & Chr(10) ' Add command to end of curernt syntax file objSyntaxDoc.Text = objSyntaxDoc.Text & strSynCmd End Sub