How to find un used Object styles in a indesign document?

hi,
I need to remove unUsed Objects Styles.
How do i find out?
How to remove it?
by,
Subha

As far as I can tell, you need to get an array of all the styles you are using, then compare it to the available styles and remove those that don't match up. I did something similar for swatches and changed it for object styles, but I am curious if there is a better way now or in the future. The following code compares and removes used and available styles based on the indexes, ignoring default styles in brackets... but hopefully someone has a more efficient way.<br /><br />jerrod<br /><br />//try this<br />var usedStyles = new Array();<br />for(var x=0;x<yourDoc.allPageItems.length;x++){<br />  usedStyles.push(yourDoc.allPageItems[x].appliedObjectStyle.index);<br /><br />}<br /><br />usedStyles.sort(compareNumbers);<br />var currentIndex = yourDoc.objectStyles.length-1;<br />for(x=usedStyles.length-1;x>-1;x--){<br />  while(currentIndex>usedStyles[x]){<br />    try{<br />      if(yourDoc.objectStyles[currentIndex].name.charAt(0)!="["){<br />        yourDoc.objectStyles[currentIndex].remove();<br />      }<br />    }finally{<br />      currentIndex--;<br />    }<br />  }<br />  currentIndex=usedStyles[x]-1;<br />}<br /><br />function compareNumbers(a, b) {<br />  return a - b<br />}

Similar Messages

  • How to find a annotation object using plugin API?

    How to find a annotation object using plugin API?

    You would use PDPage methods to find out how many on a page, and to
    get them in turn.
    Aandi Inston

  • Find element by object styles  and copy it

    Hello, I would like to create a script.
    Find element by object styles :
    Outside of document, I create on block with the object style "reference". This will be unique.
    After selected, I want to put it on CLIPBOARD or just do a copy.
    If selected by object styles isn't possible, how i can make a id on my element?
    Can you help me?
    Thancks a lot!

    Thank a lot!
    So, I have a find/change with a grep code.
    I copy an element, and I launch the search. My requete says "when you find this, paste".
    I use a javascript which do all my find/change like this :
    var myTextFrame = app.selection[0];
    var myStory = myTextFrame.parentStory;
    app.loadFindChangeQuery ('PuceSimple_enPuceCouleur_Courant', SearchModes.grepSearch);
    myStory.changeGrep();
    This work very well, so If I select my element, I copy, I select my texframe, I run the script all is OK.
    But I would like that script do this :
    I select my texframe and run my script : it copy element (it find by label or object style) and run the find/change grep.
    I put it some shots :
    1 : you see that my element is selected, it has a object style name, a label name. I think that it will be outside the page. I copy it.
    2. I run the find/change
    3 it's work !
    Do you understant what I want to do in scripting ?

  • How to find out which objects are at the end of the datafiles

    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.

    >
    My Scenario is having a tablespace of 65G but the data is 5G and that is at the end of datafile for that we are not able to resize the datafile our though is to find out what are the objects at that end of datafiles and will either alter move <owner.tablename> move or alter index <owner.index> rebuld online.
    For that how to find out which objects are at the end of the datafiles.
    >
    You may want to copy this and add it to your toolkit
    See 'What's at the End of the File?' in this Tom Kyte article from the Sept 2004 Oracle Magazine
    http://www.oracle.com/technetwork/issue-archive/o54asktom-086284.html
    And this AskTom blog shows you how to generate a script containing ALTER statements toresize your datafiles to the smallest possible. You can 'pick and choose' from the ALTER statements to do what you want.
    Then of course, you can use techniques from this article by Oracle ACE, and noted author, Jonathan Lewis
    http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/

  • How to find u0091Where used list of BSP Applicationu0092?

    Hi,
    In standard, one BSP application is calling another BSP application by hard coded in application.
    I want find a where used list of a BSP application.
    How to find ‘Where used list of BSP Application’?
    Regards,
    ...Naddy

    Hi Naddy,
    there is a way to find such hard coded things as long as they are really written as literal in the coding. So far i havn't used it on BSP but it's just a token search.
    You can use the code inspector for such things (TCode SCI). You define an object list. Therefore you have to use the static list (dynamic won't work) e.g. for all objects in a package. The ugly thing is that sap has built a filter in SCI that you cannot run it on their standard objects (no comment on that). So you get always 0 objects on sap packages. But you can debug into SCI and set a break point on statement 'SELECT'. One of the selects gets the objects from repository. In this statement sap hands select options to exclude SAP objects. If you change the values you can get these objects in the list.
    Then you run a search on these objects to find the string you look for.
    Ok that's not very comfortable but still faster than checking dozens of objects by hand.
    Best regards
    Roman

  • How to find a autorization object and roles for paricuu00F6llar documetytpe(DMS

    Hello,
    I have a question,Its urgent ..#
    For a particular document type (for example PPN)..
    How to find a authorization object and roles...Please let me know.
    In the DIS which autority object and roles they use it for this.
    <b><REMOVED BY MODERATOR></b>
    Regards
    preethi
    Message was edited by:
            Alvaro Tejada Galindo

    This issue seems to be resolved since jDeveloper/ADF 11.1.1.3.
    Am I true?

  • How to find a autorization object and roles for paricuöllar documetytpe(DMS

    Hello,
    I have a question,Its urgent ..#
    For a particular document type (for example PPN)..
    How to find a authorization object and roles...Please let me know.
    In the DIS which autority object and roles they use it for this.
    Reward with full points
    Regards
    preethi

    This issue seems to be resolved since jDeveloper/ADF 11.1.1.3.
    Am I true?

  • How to find and use MS Office on new MBA

    How to find and use MS Office on new MBAir

    Office is not preinstalled on Mac computers. Since the MacBook Air lacks an optical drive, the most convenient way to get Office is to purchase it as a download from Microsoft here.

  • How to find this Search object relavant to which root object?

    Hi All,
      how to find this Search object relavant to which root object?
      As I am having search object 'BTQuery1O', so which is root object for this?
      how to find this?

    Hi Carl,
               Search object BTQuery1O and the attribute structure associated with it is CRMST_QUERY1O_BTIL,
               even if we enhance this structure with zfield, as it is search object, then it should queried on some main database
               table, so it is 'CRMD_ORDERADM_H', here we need to add our zfield first to it, so that after added to search object then
               only search query work, so that's the reason I am asking is it possible to find 'CRMD_ORDERADM_H' relevant from
               GENIL_MODEL_BROWSER, or any way also?

  • How to find the hidden objects in Webi Rich client  report 4.0 sp 04 ?

    Hi,
    How to find the hidden objects in Webi Rich client  report  at BI 4.0 sp 04 ?
    Best Regards,
    ASR

    Hi Sai,
    Go to Report Element Tab-->There you have a Tab Cell Behaviors.
    When you flip between 'With Data' and 'Structure Only' under 'Design' Tab,you can see the some cells will be hide/Un hide behavior,if hiding of cells applied.
    Select that cell and then Under 'Cell Behaviors'-->'Hide' Tab-->and choose Show Option.
    Regards,
    Venkat P

  • How do you change the lettering style of a adobe document that has been sent to you?

    How do you change the lettering style of a adobe document that has been sent to you?

    You can do this with Acrobat, but, as Claudio says, it's not possible in Adobe Reader.
    If you do have Adobe Acrobat, you can learn how to modify text styles here.

  • How to find IDOC no with reference to one billing document no

    Dear all,
    Can you please tell :
    How to find IDOC no with reference to one billing document no
    Thanks

    Hi Pavan,
    You are absolutely correct.  But what i need to know is sometime , even in the sales order there will be no output type (basically inbound) which can be found as suggested by Sunil - I think that is the most relevant way to find the IDOC no. Hope you will agree with me. Again how to activate by IAN is also guides the idea. Only thing we need to know the exact parameter to be maintained in own data.
    Thanks for your one of the valid suggestion.
    Regards,
    Ranjan

  • How may i place a Numbers spreadsheet in an InDesign document?

    How may i place a Numbers spreadsheet in an InDesign document?
    It's possible?

    Hi.
    You can import a .xls file.
    First, go to Preferences > File handling > check "Create links ... spreadsheet files" in order to be able to update your table when modified in Excel.
    Note that you won't be able to get any formatting from Excel file, so you should create a custom table style, along with paragraph and character styles.
    While importing your Excel file, check "import options", select "Unformatted Table", and apply your table style.
    Of course, no dynamic math operation can be make within InDesign Table, you must do it in your source file, then resave it and update your link.
    If you properly used cells, paragraphs and characters styles, the formatting will be preserved when updating link to the spreadsheet.
    Don't forget your .xls file is now linked to your indesign file (just like a picture), so don't move or delete it without caution...

  • How to find Namespaces used.

    hi guys,
    My customer is using Namespaces in ABAP development. but not sure where and whats the name of it. How can i find custom developed objects are used in Customer namespace in ABAP.
    Any specific transaction or table used for saving Namespaces..?
    please suggest me.
    Thanks.
    Baasha,

    hey guys
    Thanks for your replies.
    i dont have SE21 transaction. I am now at 46C.
    whats this transaction about.
    It looks like customer using Z,Y programs in other Namespaces like
    /XXX/ etc.
    so need to find what other namespaces they are using for storing addon objects.
    Thanks
    Baasha

  • How to find out which object has a specific attribute value

    Hi all,
    which is the easiest way to check in a collection of objects which object has an attribute with a specific value?
    i.e. I have n objects of classA and they all have an attribute "String value;".
    How can I check which object has that attribute set to "myvalue"?
    Thanks,
    A.

    hi,
    i don't know if this would be the best way to do it, but i would add all the instances of the objects to a hashtable with the key as the attribute with which you want to search them. You would then retrieve the object using the value.
    Cath

Maybe you are looking for