save output

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

save output

behnaz shirazi-2
Hello all,

I wonder if you know how I can save output through spss codes.I am working
with spss 14 and I want when I run my code, it can save output as well.
I appreciate if somebody can help me.


Thank you
Behnaz

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
Reply | Threaded
Open this post in threaded view
|

Re: save output

Chris Graham-5
Hi Behnaz,

You can use a script to do this.  Make a new script file in SPSS and paste
in the following:

Sub Main
Dim Name As String
Dim objOutput As ISpssOutputDoc
Name = objSpssApp.ScriptParameter(0)
Set objOutput = objSpssApp.GetDesignatedOutputDoc
objOutput.SaveAs(Name)
End Sub

Save this and you can call it from syntax.  If, for example, you save the
file to your C:\ drive root as 'saveoutput.sbs' it can be run in syntax with
the line:

SCRIPT file="C:\saveoutput.sbs" ("C:\name_of_output_file.spo") .

I hope this helps.  There are many more examples of how to do this in
slightly different ways (for example, saving and closing the active output
window then opening a new one) available on te internet and in the archives
of this list.

Chris

On Mon, 6 Nov 2006 17:08:20 +0000, behnaz shirazi <[hidden email]> wrote:

>I wonder if you know how I can save output through spss codes.I am working
>with spss 14 and I want when I run my code, it can save output as well.
>I appreciate if somebody can help me.
Reply | Threaded
Open this post in threaded view
|

Re: save output

behnaz shirazi-2
Hi Chris;

Thank you so muchhhhh.You are incredible!!!!I am using your way.


Thanks again
Behnaz


>From: Chris Graham <[hidden email]>
>To: [hidden email], [hidden email]
>Subject: Re: save output
>Date: Tue, 7 Nov 2006 05:04:02 -0500
>
>Hi Behnaz,
>
>You can use a script to do this.  Make a new script file in SPSS and paste
>in the following:
>
>Sub Main
>Dim Name As String
>Dim objOutput As ISpssOutputDoc
>Name = objSpssApp.ScriptParameter(0)
>Set objOutput = objSpssApp.GetDesignatedOutputDoc
>objOutput.SaveAs(Name)
>End Sub
>
>Save this and you can call it from syntax.  If, for example, you save the
>file to your C:\ drive root as 'saveoutput.sbs' it can be run in syntax
>with
>the line:
>
>SCRIPT file="C:\saveoutput.sbs" ("C:\name_of_output_file.spo") .
>
>I hope this helps.  There are many more examples of how to do this in
>slightly different ways (for example, saving and closing the active output
>window then opening a new one) available on te internet and in the archives
>of this list.
>
>Chris
>
>On Mon, 6 Nov 2006 17:08:20 +0000, behnaz shirazi <[hidden email]>
>wrote:
>
> >I wonder if you know how I can save output through spss codes.I am
>working
> >with spss 14 and I want when I run my code, it can save output as well.
> >I appreciate if somebody can help me.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/