SASCodeRunner7 Word VBA Sample
Run SAS code and write messages to the Word document when Word document is opened
Private Sub Document_Open()
Dim SCR As New SASCodeRunner7.CodeRunner
SCR.SASCode = "data _null; file _put1; put 'Boo!'; run;"
SCR.Execute
Selection.TypeText "Ghosts say " & SCR.PutFile(1)
Selection.TypeText vbCrLf & "Here's the log" & vbCrLf
Selection.TypeText SCR.Log
Set SCR = Nothing
End Sub
SASCodeRunner7 was produced in 2002 by David Rubanowice, Group Health Cooperative, Seattle, WA
| |