How to delte empty Style Group from paragraph style palette

Hi Guys,
I want to delete my empty paragraphStyleGroups folder that are Style Group 1and Style Group 3 (see pic) from my palette.
I need a js code for this task.
I have created script but it deletes all the Style group from my panel.
Here is the script:
myDoc=app.activeDocument;
myStyleGroup=myDoc.paragraphStyleGroups;
for(p=0;p<myStyleGroup.length;p++)
myStyleGroup[p].remove();
Please suggest!
Chang

You are awesome man.
It is working as I need. Thanks again Kasyan.
Regards,
Chang

Similar Messages

  • How to delte empty segments/fields from input XML graphical mapping

    Hi
      I would like to delete segments which don have any values in their child segments in graphocal mapping?
    How should i use createif and existsmapping functions for this?
    Edited by: Rajesh on Jun 15, 2009 8:42 PM

    I would like to delete segments which don have any values in their child segments in graphocal mapping?
    How should i use createif and existsmapping functions for this?
    If you want to check if a value if present in a particular node or not then I dont think exists function will help you....exists function will only check if the node is existing or not.....
    <SRC>
    <Node1>
    <Field1>SAP</Field1>
    </Node1>
    <Node2>
    <Field2></<Field2>
    </Node2>
    </SRC>
    If above is your structure on which you want to implement the logic..then as per your req you dont need to have the Node2 as the field(s) within it is not having any value....then you need to implement the below logic:
    Field
                             ----------> equalS ----> Not ---> If...then / createIf ----> Target
    Constant(keep it blank)
    Regards,
    Abhishek.

  • How to remove named font style but keep paragraph style

    I receive documents in which some paragraphs begin with words that have named font styles applied, such as "Emphasis (Important)". This prevents my code from reading the paragraph style. When I use the "Clear Formatting" function (Home>Font>icon
    that shows Aa and an eraser), it removes the font style and the paragraph style. Is there a way to remove only the font style, or a way to read the paragraph style while ignoring the font style?

    Do you mean fixed-width? If so try
    final Font mYFont = new Font("Monospaced", Font.BOLD, 7);

  • How do I email a group from in my contacts?

    How do I email a group from my contacts?

    Work Around:
    On your mac:
    1.  Open a new email
    2.  Insert name of an existing group into one of the "To" fields as usual.
    3.  Highlight all the resulting names in the "To" entry
         [Highlight first name, and while holding shift, highlight last name and all will highlight[]
    4. Copy (Command C) the highlighted emails
    5. Paste (Command V) nto a pages document
    6. Remove the name and anything else preceeding the first < and also the first < of only the first entry whixh will look like this:
         [email protected]>,
    7. Remove the > of the last email which will look like this:
         , Jane Doe <[email protected]
    8. Copy the entire altered list from the pages document
    9, Go to Contact Book and click + to add a new entry
    10.. Name the entry (XXX Group for iPad) or whatever you wish to call it
    11.  Paste all the copied altered list into any one of the email entry spaces
    12.  Click on "Done"
    13.  Create new email On iPad and click on + in any one of the "To" lines and search for "XXX Group for iPad"  You cannot just key in XXX Group for iPad!!!!!!!, you must use + contact search.
    14.  Enter the selected iPad contact group into the "To" line.
    15.  All the entries will now appear in the "To" line and you are good to go.
    Adding or deleting email addresses from the iPad group:
    Easiest:  Alter the original mac group in the usual way and repeat steps 1-14 above.  It seems impossible to edit within the emai line of the iPad contact entry.
    Rediculously simple once figured out.
    Happy emailling, but please send Bcc so that you don't spread your groups' email addresses all over the internet for spam, viruses, and other unwanted emails.  Be considerate and ask your recipients to notifiy you if they wish to be deleted from the lists you compose.

  • How do I send a group from my address book to someone else?

    How do I SEND A GROUP FROM MY ADDRESS BOOK TO SOMEONE ELSE.

    Yes you can by creating a group and then dragging the contacts in to it. However, since iCloud, the Edit Distribution List feature has been grayed out. Without that feature, it is not possible to specifically select a single email address for those contacts that have multiple email addresses. A major flaw that will hopefully be fixed.

  • How do i CC: a group from my address book

    when I reply to a message, how do I pick a group from my address list and have the reply cc:'ed to everyone in that group ?
    in the "WRITE" box that pops up, there's no reference to address list and when I start typing the name of the group, it does not come up in the suggested completions.
    thanks
    richard

    In principle, open a Cc: box in your email message composition window, and add the "group" (aka Mailing List) to that.
    Is it OK for all the members of the List to see and know each others' addresses? Would Bcc: be appropriate?
    I don't like the sound of the Mailing List not being volunteered as a possible address. What if you use F9 to reveal the Contacts Sidebar and add it from there?

  • How do I email a group from a list of email addresses in a pdf?

    how do I email a group from a list of email addresses in a pdf?

    Work Around:
    On your mac:
    1.  Open a new email
    2.  Insert name of an existing group into one of the "To" fields as usual.
    3.  Highlight all the resulting names in the "To" entry
         [Highlight first name, and while holding shift, highlight last name and all will highlight[]
    4. Copy (Command C) the highlighted emails
    5. Paste (Command V) nto a pages document
    6. Remove the name and anything else preceeding the first < and also the first < of only the first entry whixh will look like this:
         [email protected]>,
    7. Remove the > of the last email which will look like this:
         , Jane Doe <[email protected]
    8. Copy the entire altered list from the pages document
    9, Go to Contact Book and click + to add a new entry
    10.. Name the entry (XXX Group for iPad) or whatever you wish to call it
    11.  Paste all the copied altered list into any one of the email entry spaces
    12.  Click on "Done"
    13.  Create new email On iPad and click on + in any one of the "To" lines and search for "XXX Group for iPad"  You cannot just key in XXX Group for iPad!!!!!!!, you must use + contact search.
    14.  Enter the selected iPad contact group into the "To" line.
    15.  All the entries will now appear in the "To" line and you are good to go.
    Adding or deleting email addresses from the iPad group:
    Easiest:  Alter the original mac group in the usual way and repeat steps 1-14 above.  It seems impossible to edit within the emai line of the iPad contact entry.
    Rediculously simple once figured out.
    Happy emailling, but please send Bcc so that you don't spread your groups' email addresses all over the internet for spam, viruses, and other unwanted emails.  Be considerate and ask your recipients to notifiy you if they wish to be deleted from the lists you compose.

  • Problem with footer in table style not applying paragraph style... or just me?

    I'm having a niggling problem making a table style with cell/paragraph styles for the header, body, and footer respectively. I want to make it as simple as possible for other users but one thing keeps tripping me up. I'll try and describe with screenshots. I'm using InDesign CS5 on Windows 7.
    I have a table style set up with cell styles for the header, body, and footer, and paragraph styles for each as well. Say I'm converting a list of generic text to this table:
    i convert it to my table style. The body style is a numbered list:
    I convert the header to an, err, Header. The cell applies the header paragraph style as I should expect:
    I convert the footer likewise, but it maintains the Body text paragraph style as an override!
    So naturally I clear the override and it works fine. But of course, I'd rather it acted like the header row. I can't work out where the override on the footer comes from and why it operates differently in this respect to the header row. There is nothing different about how the styles are constructed. Have I made a mistake somewhere, or is this correct behaviour I'm misinterpreting, or something...?
    edit: Here is the file, if that will help:
    https://www.dropbox.com/s/4kzgui1itaskuvz/strip%20list%20test.indd

    Hi,
    I was able to reproduce the issue you are facing.
    I will be logging a bug for this and it would be investigated.
    Thanks a lot for reporting the problem!!
    Javed

  • [JS IDCS5] Create tags from paragraph styles

    Hello,
    I would like to iterating through al the paragraph styles within a document to create there tags from. The tags should have the same name as the paragraph styles. Is that possible and how?
    Regards, Sjoerd

    Hi Phil,
    Absolute beginer here. The script creates tags for the styles outside groups, but for some reason it doesn't create the tags out of the Paragraph Styles in folders.
    I enabled the line below and tried to change the "myPStyle"  for "myAllPStyle" in the following lines, but still nothing. Gives error when reaches the line myDoc.changeText();
    Any hint?
    var myAllPStyle = myDoc.allParagraphStyles; //if you want this enable a line all the folder paragraph styles also consider
    for (i=2; i<myAllPStyle.length; i++){
         var myAllPStyleName = myAllPStyle[i];
         //alert(myPStyleName.name);
         try{
              var myXml = myDoc.xmlTags.add(String(myAllPStyleName.name));
              }catch(e){}
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
         app.findTextPreferences.appliedParagraphStyle = myAllPStyleName;
         app.changeTextPreferences.markupTag=myAllPStyle[i].name;
         myDoc.changeText();
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    Also, how can I make it Map the tags with the PStyles by name after with the script?
    Thanks so much
    Hector

  • How to delete empty contact groups on iPhone 4

    Hi,
    I am using iCloud to store all of my contacts, calendars, etc.  About a week ago I had to restore my iPhone and when it was done resetting, I found that I had duplicate contacts in groups that fell under the 'On my iPhone' group.  Since I have all the contacts I want in my iCloud folders, I don't need these groups, especially after I deleted all of the contacts within them, leaving them empty.
    My question is how do I delete these unwanted and empty 'All on my iPhone', 'Family', 'Friends', 'School', and 'Work' groups from my phone so that they don't appear in my contacts app at all. 
    Thanks!

    Hi, I have a similar problem:
    There are groups that remain in my iTunes "Info" that won't go away even after resetting the iPhone and resetting via software update.
    I cleared out all my contacts in the address book; went into finder - applications support - address book - metadata and deleted 4 items that have a *.abcdp extention. (except the apple address)
    I even tried syncing with iCloud and using the empty iCloud database to overwrite what I have in iPhone then to my iTunes,
    I tried downloading an app called Easy groups to delete the groups on the iPhone 4s ...
    Still there are 4 empty Groups in iTunes.

  • How can I email a "group" from my iPad 2?

    I cannot figure out how to send a message to a group from my contacts.  I must select each group member one by one to add them to a message...lame!  Does anyone have the solution?

    You can't.  You'll have to add each address you want to sent to........

  • How can we download target group from sap crm gui

    Hi Experts,
    Please let me know, how to download target group from the SAP CRM GUI . Information: TG having 75000 BPs and using sap crm 7.0
    Thanks in advance..!!
    thanks and regards
    Vinay

    Hi Vinay,
    You can consider below link if you have already not done.
    Export Target Group | SCN
    Also found below note/s which may not be appropriate for the version that you are working, still will give some hints on how to go about it especially when you have more BPs to be downloaded.
    490694 - Target group export from CRM Online to application server
    459913 - Target groups: Exporting BPs to application server
    Rgds
    Hari

  • Find start text index from paragraph style?

    hi,
        In my project,i have paragraph style name,i need to find out that paragraph start and end index positon ?
    pls,anyone help me?
    thanks,
    screen410099

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • From paragraph Style to "New Hyperlink Destination"

    Dear InDesign Experts
    Please help me to find a way or Script to add all headings of specific paragraph style to "New Hyperlink Destination....(Text Anchor)"
    and ... is there any automation for such a task?
    Thank you in advance

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • Exporting to filename from paragraph style

    I have a 80 page indesign file.  I would like to export to single page pdfs, with filenames based off a paragraph style on each page.
    Is this possible?  I have no background or experience with scripting.  Any help would be much appreciated.
    Thanks
    Derek

    The link you sent me was about Applescript. But I looked it up in the Javascript reference and this seems to work.
    You need to make three changes:
    Line 6: Change test to the name of your paragraph style.
    Line 15: Change [Smallest File Size] to the export preference you like to use, so you get resolution, bleed etc correct.
    Line 19: Change export path, I exported mine to my root, my harddrive, if you are on a pc "/c/cookbook/" + pdf_name + ".pdf" might be a better path.
    for(var p = 0; p < app.documents[0].pages.length; p++) {
         var frames = app.documents[0].pages[p].textFrames;
         var pdf_name = null;
         for(var i = 0; i < frames.length; i++) {
              if(frames[i].paragraphs[0].appliedParagraphStyle.name == 'test') {
                   pdf_name = frames[i].paragraphs[0].contents;
                   break;
         if(pdf_name != null) {
              app.pdfExportPreferences.pageRange = app.documents[0].pages[p].name;
              var export_preset = app.pdfExportPresets.item("[Smallest File Size]");
              app.documents[0].exportFile(
                   ExportFormat.pdfType,
                   File("/" + pdf_name + ".pdf"),
                   false,
                   export_preset

Maybe you are looking for