2 Replies Latest reply on Jul 11, 2012 1:50 AM by Jump_Over

    Import styles question

    Jump_Over Level 5


      How to be more specific while import style from external file? I am talking about method:


      Document.importStyles (ImportFormat.PARAGRAPH_STYLES_FORMAT,

                                              myFile[, GlobalClashResolutionStrategy=GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE])


      The goal is to import chosen styles only (one, few of them) nor all of them.



        • 1. Re: Import styles question
          Dirk Becker Level 4

          As you found out, the method is called "importStyles" not "importStyle".


          One approach is to use the "properties" property to transfer the essentials of any native object.

          Sub-objects such as the various settings and and options of object styles require extra steps, though.



          myStyle.properties = otherStyle.properties;


          You can also create a blank document, import the styles there and remove the non desired ones.

          • 2. Re: Import styles question
            Jump_Over Level 5

            To keep connection with "Styles" I was looking for StylesRange option. InDesign UI is able to do it, since there are checkboxes in import window, thats why. If there is no script method way - thats OK. I just asked more experienced people before I step into monk room.