Removal (suppression), all named groups (labelled) on a page

"" Hoping someone can help make the script below the work I am not too, I get the error: object does not support the property or method "itemByName".

I am trying to remove all the groups in the document marked "Text_Block", I can easily remove the last group with app.documents [i].pageItems.itemByName ("Text_Block") .remove (); but impossible to create a loop to delete them all. I tried a few variations and I know it will probably be only a small change, but I just can't grasp it.

allItems var = app.activeDocument.allPageItems;

for (i = 0; i < allItems.length; i ++)

{If (.itemByName [i] allItems is 'Text_Block')

{allItems [i].itemByName("Text_Block").remove () ;}

}

Thanks a lot for any help in this, Bren

Thanks Jarek,

I tried to use your replacement line and I tried a few variations, but it still doesn't remove any of the groups (think it's more my experience than anything else).

It is me thinking differently, and even though I'm not sure that this is the way to go, the script below seems to work without any problems.

for (i = 0; i<30;>

{try {app.documents [0].pageItems.itemByName ("Text_Block") .remove ();}}  }

{catch (err) {""}}

I know that there is never more than 30 of them on the page for this were defined as the number of max, I don't anticipate any problems but I didn't do like that before, so not 100% satisfied, please let me know if you think this isn't the way to go.

Thank you for your help, Bren

Tags: InDesign

Similar Questions

  • I try to organize my favorites, but all I get is a blank page that says loading

    I can't organize my favorites, I can add, but I can't remove. All I get is a blank page. I have Windows XP Service Pak 3

    Hi JohnMonahan,

    1. are you referring to the Favorites of internet explore?

    2 when was the last time it was working fine?

    3. what happens when you try to delete the Favorites?

    Windows XP stores Internet Explorer Favorites in this location C:\Documents and Settings\ (username) \Favorites.

    Check if you access and remove favorites from the above location.

  • When I have a group of emails that I want to delete, what should I do to remove them all together in a single action, rather than having to delete them individually?

    Original title: I HAVE WINDOWS LIVE MAIL, HOW to REMOVE SPAM IN a SINGLE ACTION?

    When I have a group of emails that I want to delete, what should I do to remove them all together in a single action, rather than having to delete them individually?

    Hope you can help.

    Terry.

    Use CTRL - A or editing. Select all and then press the delete key.   Issues for Windows Live Mail must be addressed here: www.windowslivehelp.com

    Steve

  • How can a computer refurbished be removed from its original group policy?

    Original title: refurbished computer locked in group policy

    How can a computer refurbished be removed from its original group policy?

    What is a "destructive factory restore?

    Most if not all Windows 7 PC's have a hidden partition on the hard drive that allows you to restore the machine as long as the plant. It is "destructive" because it erases all personal data and all the applications that have been loaded by the owner. You should consult the manufacturer's web page for detailed instructions.

  • How can I remove "Open all in tabs" of my favorites?

    How can I remove "Open all in tabs" of my favorites? It is very annoying when you click on it by mistake. I downgraded from 29 to 28 due to the various bookmark questions I had. I never had this problem with the previous version of FF, why did have to mess with stuff that worked.

    I love the new layout. Thank you

    Add code to the file userChrome.css below default @namespace.

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #placesContext_openContainer\:tabs,
    #placesContext_openSeparator {
     display: none !important;
    }
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

    You can use this button to go to the Firefox profile folder currently in use:

    • Help > troubleshooting information > profile directory: see file (Linux: open the directory;) Mac: View in the Finder)
  • How to back up or restore all my groups of tabs (preferably 1 operation)?

    I would like to save all my groups of tabs, both for purposes of backup, but also for migration to another computer. How can I do this in a single operation?

    The same consideration would apply to all the groups tab restore from a previously saved session.

    Eric

    The app tabs and tab (Panorama) groups are stored in session data in the sessionstore.js file in the Firefox profile folder

    You can make a backup copy of this file.

    Help > troubleshooting information > profile directory: opens showing the file

  • Lost all the "groups" in Contacts with El Capitan upgrade

    I have just trepidatiously improved to El Capitan on my Macbook Pro.  All the "groups" that took a lot of time to create disappeared in the new Contacts folder.

    Someone else has run into this issue and how to resolve?  Great gratitude for your help!

    They are always there.  Just go to the menu display-> display groups.

  • retrieving a list of all named and Notifiers queues

    is there a way to get a list of all named and Notifiers queues are open

    No, you will need to register somewhere as get you them.

  • complete removal of all components (remnants) of all versions of IE from PC

    I deleted all versions of IE from my PC, but IE still infringes on my privacy by installing large files, when I use internet. How to remove completely all of the components of Internet Explorer without affecting my favorite browser (installed)?

    BTW is there some subtleties I agreed without knowing who gives Microsoft the right to install any unwanted, privacy, infringing files on my computer without asking my consent?

    -Gunnar

    As well noted Veritas, as long as you use Windows, you use IE (or a version of it) because it is integrated into the system. It is literally impossible to "remove all components of Internet Explorer".

    If you are concerned that on the issues of confidentiality and Microsoft "offences", I suggest you use many varieties of Linux.
  • Remove the entry of main contacts without even the removal of the contact group.

    I want to have the members of the group to NOT be in my regular contacts list. Although I used the "group only contact" - type option, it gives me 2 entries for the same person: one appears as the name, the other as email for the person (in the Group folder). If I delete my main contacts list entry, it is removed in the contact group. Help!

    • You use Windows Mail or any other email client?

    Check these to see if they contain measures: (Windows Mail)

    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-Windows-Mail

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    http://Windows.Microsoft.com/en-us/Windows-Vista/Windows-mail-setting-up-an-account-from-start-to-finish

  • My mouse no longer works 2 days ago... I restored my pc on the eve, it works... but that did not help my mouse. This mouse works on another pc... I am getting error usb? I removed & charged all under the usb tab__

    My mouse no longer works 2 days ago... I restored my pc on the eve, it works... but that did not help my mouse.   This mouse works on another pc... I am getting error usb?  I removed & charged all the usb tab

    Hello

    You may need assistance from a real store tech computer (no leeks and glances at a BestBuy or)
    other BigBox stores) or the manufacturer of your system Support.

    What is the error of USB?

    Follow these steps to remove corruption and missing/damaged file system repair or replacement.

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe)
    program generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -----------------------------------------------

    Please make these now even though you might have tried this before:

    Remove the mouse if indicated in the Manager of devices - devices of score - click right on - UNINSTALL.

    Then lets refresh the USB stack

    Control Panel right CLICK on EVERYTHING - Serial USB controllers - device configuration-manager and
    UNINSTALL all but the category itself - REBOOT - it refreshes the drive and battery USB

    This KB shows XP how to and the method of Vista is identical
    http://support.Microsoft.com/kb/310575

    ----------------------------------------------

    If necessary try these two:

    Tips for solving problems of USB devices - and a Mr Fixit
    http://windowshelp.Microsoft.com/Windows/en-us/help/c39bd203-f729-47a4-8351-83291e13c8a81033.mspx#EGB

    Hardware devices not detected or not working - Mr. Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Why the extra bar under the search bar was added without a way to remove it? I like to keep a page claire undistracting.

    I would like to be able to remove the bar below the search line in the middle of the page and the stuff recently added at the bottom of the page. An empty clean page. Can be a person the choice to take control of a screen on his computer? I would also like to comment on the addition of the blurb on impossible to load this * AD * stuff because I have a filtered list to eliminate all the other nonsense that are added with updates to adobe flash for ads. Until they can help create the means to stop all ads that I will continue. If you don't allow to remove the bs in the middle of the page, I'll have to rewrite your code to remove it and block all updates. I don't like ads extensively.

    Doug H

    I received this info by private message:

    It's the text of presentation... wherever I blocked ads from loading that it appears in the empty place holder.

    "Unable to connect, firefox could not connect to the server ' blah blah blah @doubleclick.net.

    Sounds as if the announcement was incorporated by using an iframe, which is an entire web page and not just a picture. Your adblocker seems to prevent the entire page to be retrieved if Firefox shows the same kind of message, instead of the page as if you had loaded it in its own tab. Perhaps a different advertising blocker could hide the frame entirely, which would be more aesthetic.

  • How to hide all the empty fields on a page?

    Hello

    I want to hide all the empty fields but to exclude tables as it messes up the table. He hides this empty cell with borders and the table does not look right.

    My script below works currently it hides all the empty fields on this page.

    Is it possible to exclude on the tables?

    Thanks to all in advance.

    function hideFields (myParentObject) { }

    var allChildElements;

    var intNumElements;

    var currentElement;

    var j;

    var temp;

    //Get the parent all child element nodes

    allChildElements = myParentObject.nodes;

    //Total number of items in the object

    intNumElements = allChildElements.length;

    //Loop through all child elements

    for(j=0; j< intNumElements; j++){

    currentElement = allChildElements.item (j);

    //If the element is another subform which we will call the new function recusively

    If(allChildElements.item (j) .className = "subform") { }

    //if (currentElement.layout = "table") {}

    //else{

    //}

    other If(currentElement.className = 'subformSet') { }

    //If the objects are fields, then we'll want to hide their

    other If(currentElement.className = 'field') { }

    //Check to see if the field is a button - don't count buttons

    temp = currentElement.name;

    if (temp.substring(0,6) !== "Button"){

    If (currentElement.rawValue == "" | "") ( currentElement.rawValue == null) { }

    currentElement.presence = 'hidden';

    //Check Jugendherberge exclusion - boxes option

    other If(currentElement.className = 'exclGroup') { }

    / / hide the exclusion group and not the individual radio buttons

    If (currentElement.rawValue = "") { }

    currentElement.presence = 'hidden';

    { } / / end of loop for

    { } / / end function

    Hello

    A table has a class name of the subform, but will have a property of page layout with the value of "table."  If you find one of these, then you sweep that subform.

    But you code seems to have commented, that didn't work for you?

    Concerning

    Bruce

  • How to remove the link "Request itself" from the login page

    Hi all, I want to remove the link "Request itself" from the login page. It is not a menu item. So how can I remove it? Any ideas?

    Go to the System Configuration in Console Design

    Search authorized registration and XL. SelfRegistrationAllowed it is wrong. No need to modify the JSP

  • can I view all the bookmarks of all time next to my home page, as the old windows 2003 could, I now have windows 7 &amp; firefox 4. I love being able to see all my favorites all the time.

    can I view all the bookmarks of all time next to my home page, as the old windows 2003 could, I now have windows 7 & firefox 4. I love being able to see all my favorites all the time. Edit

    Just hit CTRL + I

Maybe you are looking for