3 Replies Latest reply on May 26, 2014 12:01 AM by Laubender

    Indesign Preferences

    Sudha K Level 1



      I have used the below code to set Preview Options of InDesign Preferences (InDesign Preferences -> File Handling -> Saving InDesign Files).


      app.generalPreferences.includePreview = true;   // Always Save Preview Images with Doc

      app.generalPreferences.previewSize = PreviewSizeOptions.medium;    // Preview Size

      app.generalPreferences.openRecentLength  = 10;       // Number of Recent Items to Display

      app.generalPreferences.previewPages = PreviewPagesOptions.FIRST_2_PAGES;    // Prview pages



      Its working fine for me in InDesign CS6 but Its throwing error in InDesign CS5.  When I searching in CS5 Reference, it does not have the property for "app.generalPreferences.previewPages".  But InDesign Preference having this property.  I want to run the script in both version(CS5 and CS6).  How can I make to run in both version?



      Sudha K

        • 1. Re: Indesign Preferences
          Harbs. Level 6

          I did not remember this, but it looks like they forgot to add that property until CS6.


          You should do something like this:

          if(parseFloat(app.version) >= 8){
          app.generalPreferences.previewPages = PreviewPagesOptions.FIRST_2_PAGES;



          • 2. Re: Indesign Preferences
            Sudha K Level 1




                 The above code will work if the application version is 8 or above.  For CS5, app version is 7.0 then the code will not execute.  In this case, How can i set tat Preview page options settings in CS5???


                  I want to set PreviewPageOptions setting in CS5. Reference does not have tat property but InDesign Application having tat option. Want to run it in both version. Is it possible??



            - Sudha K

            • 3. Re: Indesign Preferences
              Laubender Adobe Community Professional & MVP

              @Sudha – As Harbs already layed out:

              There is no way to script that with ExtendScript in CS5 (and CS5.5 as well; I checked that).


              Maybe there is a way to access the Preference Window and the options within of InDesign directly with AppleScript on Mac OSX or VBScript on Windows? Don't know…


              What can be done then?
              1. Maybe Plug in programming with C++ (out of my realm)

              2. Manipulating the preference file directly somewhere stored on the computer (very hard, not impossible, but when done not properly can destabilise InDesign – I would not tinker about this)


              Or (just a thought), having two or several preference files at hand, prebuild and exchange the current preference file to the desired one by using ExtendScript.


              Is that a good idea? Don't know… Could also cause chaos, if the user is deliberately changing something, is running that script and some of the changes are lost. Things, that have nothing to do with the Preview feature you are trying to access.