LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 1998)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Sep 1998 09:15:42 +0200
Reply-To:     Oliver Loch <loch@PK-I.MED.UNI-MUENCHEN.DE>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         Oliver Loch <loch@PK-I.MED.UNI-MUENCHEN.DE>
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Subject:      Re: "Floating Titles"
Content-Type: text/plain; charset=us-ascii

William

In addition to my WIDTH75/80 macros/scripts I wrote a SETTITLE macro/scripts that will replace what is labelled 'title' in the Output Navigator with any text you like. Maybe that's what your looking for.

Oliver Loch

-----> cut here <----

'Author: Oliver Loch, loch@pk-i.med.uni-muenchen.de ' 'Date: September 12, 1997 ' 'SPSS 7.5 ' 'FILENAME: settitle.sbs ' 'Begin Description ' This script changes the 'Title' in the Output Navigator to ' some text passed by a macro call and optionally adds a ' page break. ' ' Syntax: ' ' settitle title='I am some meaningful text' /newpage=yes. ' ' Example: ' If you run frequencies (e.g. freq age) SPSS will produces some tables ' (Notes, Statistics, and Age) and the title 'Frequencies' preceeding the ' tables. You may want to change this title to 'Demographics' using ' settitle title='Demographics' . ' or you may want to have blank title and begin the tables on a new page: ' settitle title='' /newpage=yes. ' ' 'End Description ' ' 'Assumptions ' This script is intended to be called from within a macro which passes ' the parameters towards the script. In the following the script is ' supposed to be located at <full_path_and_file_name> somewhere on you ' harddisk. ' ' The definition of the macro mentioned above is given below. Please copy ' this macro to your syntax file and remove the leading comment signs ('). ' You also must replace <full_path_and_file_name> with the full specification ' of the location you stored this file to (e.g. c:\SPSS\include\title.sbs). ' ' * Begin Macro definition . ' ' ' DEFINE settitle (title = !DEFAULT('') !CHAREND('/') ' /newpage = !DEFAULT('NO') !CMDEND). ' compute a___=1. ' var lab a___ !CONCAT('pb=',!CONCAT(!UPCASE(!UNQUOTE(!newpage)),!UNQUOTE(!title))). ' SCRIPT '<full_path_and_file_name>'. ' !ENDDEFINE. ' ' * End Macro definition .

Sub Main() Dim objOutputDoc As ISpssOutputDoc Dim objItems As ISpssItems Dim objItem As ISpssItem Dim myindex As Long Dim lab As String Dim objSPSSText As ISpssrtf Dim mytitle As String

Dim objSpssInfo As ISpssInfo

Set objSpssInfo = objSpssApp.SpssInfo myindex=objSpssInfo.NumVariables

Do myindex=myindex-1 Loop Until objSpssInfo.VariableAt(myindex)="a___" mytitle=objSpssInfo.VariableLabelAt(myindex)

Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc Set objItems = objOutputDoc.Items()

myindex=objItems.Count Do myindex=myindex-1 Set objItem = objItems.GetItem(myindex) lab=objitem.Label Loop Until lab="Title" Or lab="Titel" If Left(mytitle,5)="pb=YE" Then objitem.PageBreak=True mytitle=Right(mytitle,Len(mytitle)-6) Else mytitle=Right(mytitle,Len(mytitle)-5) End If objItem.Label=mytitle Set objSPSSText =objItem.ActivateText objSPSSText.Text=mytitle objItem.Deactivate objItem.Selected=False

End Sub

-----> cut here <----

William M. Bailey wrote: > > In the old SPSS DOS days we could set-up what I call "floating titles" for > tables as illustrated below (overlook some syntax problems). Is there a way > to do this under any Windows version? I am using the width75/80 macros for > width but not shown here.


Back to: Top of message | Previous page | Main SPSSX-L page