SPSS Statistics

 View Only
  • 1.  SPSS 28. Output export to word includes blank 1st page

    Posted Sat June 18, 2022 10:42 AM

    Hi everyone,

    I have a simple syntax script which creates a codebook and then outputs it to a word document. 
    I have TITLE and SUBTITLE Commands in my syntax but before they appear in the output I have a blank page. Is it possible to suppress the blank page?

    Thanks
    Michael



    ------------------------------
    Michael O'Brien
    ------------------------------

    #SPSSStatistics


  • 2.  RE: SPSS 28. Output export to word includes blank 1st page

    IBM Champion
    Posted Sat June 18, 2022 12:23 PM
    I am not sure that the Word export  is paginating correctly and, hence, might not be displaying the titles correctly.  However, I may have some print settings that are messing this up.  PDF export does show the titles as I expected.,

    However, if pagination with titles works for you, I have a solution that would eliminate the page break on the first page.  It requires the use of the SPSSINC MODIFY OUTPUT extension command.  This command comes with a number of custom functions that extend its capabilities, including a function called customoutputfunctions.breakbeforeitems.

    The posted version of this command only allows turning page breaks on, but I have a version that adds a parameter so you can turn page breaks on or off.  I can post a version of the extension that includes this parameter.  You would then use it like this.

    title 'this is the title'.

    <your code>

    SPSSINC MODIFY OUTPUT PAGETITLES
    /IF OUTLINETITLE= "Page Title" PROCESS=ALL
    /REPLACE ITEMS
    /CUSTOM FUNCTION="customoutputfunctions.breakbeforeitem(pageBreak='off')".

    This would turn off the automatic page break on the Page Title object in the Viewer but just for that object, so subsequent pages would have page breaks and the title..

    Let me know if you want to try this, and I'll post the updated version of the extension command.  If that works out, I'll submit the update to the extension hub.

    --





  • 3.  RE: SPSS 28. Output export to word includes blank 1st page

    Posted Sun June 19, 2022 03:32 AM
    It does seem to be specific to export to word as exporting the same output as pdf doesn't include a blank page and the title is centered in the middle of each pdf page. Also the title and subtitle are on every page of the pdf. The word version does include a page break at the very start of the exported document (turn on show paragraph marks and hidden symbols) 

    I don't think its worth an extension, as its just easier to delete the extra line break until an update to resolve it is available. 
    BTW the subtitle command seems to also include the title text but may be convention.

    ------------------------------
    Michael O'Brien
    ------------------------------