InDesign: remove all the empty frames online script?

Hello

I need to delete all images empty inline in a document. These empty frames inline appear once a data merge is done.

Help, please!

Try this:

var doc = app.documents[0]
var inlines = doc.stories.everyItem().pageItems.everyItem().getElements();
while(fr=inlines.pop()){
  if(fr instanceof Group){continue}
  if(fr instanceof TextFrame){
    if(fr.contents == ""){fr.remove()}
    continue;
  }
  if(fr.graphics.length==0){fr.remove()}
}

Substances

Tags: InDesign

Similar Questions

  • Illustrator CS5 - removal of the empty text boxes

    I always found it difficult to choose the type that I want when I use the text tool to edit text. I can click directly on the type, but I guess I'm a zillionth of a pixel off because about half of the time, it assumes I want to make a new text box. If my documents are littered with boxes of invisible empty type, which often get grouped with other objects, causing a lot of problems. I would like to know:

    1. how to make it easier to choose the type.

    2. how to remove all the empty text boxes. I remember hearing in an integrated way to do this, which indicates Adobe knows that this is a problem, but rather than the easier type selections, they give us a shortcut to undo the problem they have caused. In any case, I forgot the shortcut.

    Thanks for any help,

    Dave

    Try it Select > object > Eparses Points control. It should recognize the empty text objects.

  • Remove all the missing links with frames

    How can I make a script to remove all the missing links with frames in indesign?

    var doc = app.activeDocument;
    Links var = doc.links;

    for (var i = links.length - 1; i > = 0; i--) {}
    If (links [i] .status == LinkStatus.LINK_MISSING) {}
    try {}
    Links [i] .parent. Remove();
    var image = link.parent;
    var frame = image.parent;
    Frame.Remove ();
    counter ++;

    }
    {} catch (err)
    $.writeln (i + "-" + err);
    }
    }
    }

    I have try this script, but still remain a framework, what is wrong with that?

    It works for me:

    var link, image, frame,
    doc = app.activeDocument,
    links = doc.links,
    counter = 0;
    
    for (var i = links.length-1; i >= 0; i--) {
        if (links[i].status == LinkStatus.LINK_MISSING) {
            try {
                link = links[i];
                image = link.parent;
                frame = image.parent;
                frame.remove();
                counter++;
            }
            catch (err) {
                $.writeln(i + " - " + err);
            }
        }
    }
    
  • Windows 7, script to remove all the user accounts

    I'm on the technical support team.  On my desktop I have connection to more than 10 accounts per day to test and ensure that users are working.   Y at - it a script or a way to remove all the accounts?  Now, I need to right click on "computer" / Properties / advanced system settings / user profile settings / then remove them all one at a time and each of them take like 30-45 seconds.  I can remove the easy user profiles, but all accounts really slow things down.

    Hello

    Thanks for posting your query on the Microsoft Community.

    I would like to know some information.

    You are connected to a domain network?

    I suggest you re-post your query on the TechNet forums because we have experts working on this type of questions and for you help the better.

    Check out the link:

    https://social.technet.Microsoft.com/forums/Windows/en-us/home?category=w7itpro

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Suddenly, InDesign stopped work and remove all the fonts...

    Suddenly, InDesign stopped work and remove all the fonts used in the document... but I can use it in other programs such as Photoshop and Illustrator. tried to delete and reinstall the InDesign but it isn't working again

    I hope to find a quick solution to the problem

    I finally solve the problem...

    reinstall all fonts again and its working,

    Thank you all...

  • How to remove all the pictures imported from my I phone 6

    How to remove all the pictures imported from my I phone 6

    Imported from the place where?

    If they were imported from your computer, you remove the same way that you put on there: by syncing with iTunes. to remove them, you need to synchronize an empty folder, or simply turn off the Photo in the form of synchronization option summary pane when the iPhone is connected.

  • 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

  • Remove all the Options from Shuttle point

    Apex 3.2

    I have a shuttle element called P19_SHUTTLE.

    I want to hide all select it and remove all the options.

    I tried

    Header HTML

    < script >

    function shuttle_settings()

    {

    $x_Remove ('P19_SHUTTLE_MOVE_ALL');

    $x_Remove ('P19_SHUTTLE_REMOVE_ALL');

    }

    < /script >

    HTML Body attributes

    OnLoad = "shuttle_settings ()" "

    This does nothing.

    What should I do?

    Gus

    Hello

    Well, you're 100% sure that these icons have id?

    I'm sort of reminder that APEX 3.2, there is no identity for these icons.

    Kind regards

    Jari

  • Photoshop CS5 does not remove all the layerset order...!

    Hello world!.

    Photoshop CS5 does not remove all the script layerset order...!

    Can someone explain why it happens...?

    app.activeDocument = theCopy;

    theCopy.layerSets.removeAll ();

    Thanks in advance.

    -yajiv

    The same reason that it is probably no command to remove all layers. You must write your own function if you want to do than IE:

    removeAllLayersets();

    function removeAllLayersets() {}

    var LSets = activeDocument.layerSets;

    var Count = LSets.length;

    for (var t = Count; t > 0; t-) {}

    LSets [t - 1] .remove ();

    }

    }

  • How to remove all the photos from my iphone 5?

    How to remove all the photos from my iPhone 5?

    1. Open the Photos app.
    2. Click on the photo or video you want to delete.
    3. Type > delete the Photo.

    Delete several photos

    1. Open the Photos app and press Select.
    2. Click on each photo or video that you want to remove.
    3. Type > delete Photos.

    Delete photos on your iPhone, iPad and iPod touch - Apple Support

  • I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    I've recently upgraded to El Capitan - biggest problem is timing removed all the entries in my previous ical. Any ideas how I can track down the file containing these essential documents and install in the new program?

    All calendars are enabled in the sidebar?

  • If I remove all the data from the Web site it will also remove all my passwords?

    If I remove all the data from the Web site it will also remove all my passwords?

    It will not erase your saved in the Keychain passwords, but you need to connect back to all Web sites (like this one) that require you to log in.

  • How can I remove a misspelled username or an email addy that is saved in the menu drop down without removing all the?

    When the e-mail addresses or user names stored in the drop-down list for easy access, is there a way to delete just the wrong spelled those without removing all the good spelled those?

    When you see one of these misspelled items, highlight it and then press the DELETE key (or hit {Ctrl + delete} on some platforms).

    http://support.Mozilla.com/en-us/KB/form+AutoComplete#Deleting_individual_form_entries

  • why I can't take a new picture and I can't remove all the images of photos.new will not be saved

    why I can't take a new picture and I can't remove all the images of photos.new will not be saved

    Check your storage space on your iPhone, iPad and iPod touch - Apple Support

  • Remove all the patches and windows updates

    Hello

    How can I remove all the patches by using the Recovery Console - command prompt environment. Is it possible to remove all the patches. Where are all the patches and updates KB is stored in the Windows VISTA Business operating system. Help, please

    Thank you
    Concerning
    Anoop

    Hi Anoop,

    Thank you for writing to Microsoft Vista Community Forums.

    You can uninstall patches to a command using msiexec.exe and command line Options.

    For more information about the removal of patches of command prompt, access the link below: http://msdn.microsoft.com/en-us/library/aa372104 (VS.85) .aspx

    It will be useful.

    Thank you and best regards,

    Srinivas

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think

Maybe you are looking for

  • Tecra A8 - 103 - how to increase memory for video card?

    Hello does anyone know how to increase the memory for the video card on my Tecra A8-103? I've heard that I can 'take' of RAM memory and 'Add' to video memory card, but don't know how? I just live in the BIOS, but have not seen this feature? I need, b

  • Shrunken office top sides

    My office on my screen has decreased, so there is a border of 2 1/2 inch on both sides

  • BlackBerry Z30 problems with everything!

    Just bought my z30. But I have problems with:-Blackberry world isn't download ANY application "an error has occurred processing your request" - the camera when flips horizontally do not reverse the camera image and use that half of the screen - the c

  • HPCM - configure the database failed

    HelloRecently, I installed HPCM 11.1.2.2 on top of my existing installation, setting up database Coordinator, I get error below.[EPMCFG] [ERROR] [EPMCFG-01020] [oracle. EPMCFG] [tid: 21] [SRC_CLASS: com.hyperion.config.wizard.impl.RunAllTasks] error:

  • Data corruption VMware CBT difficulty Questions

    VMware KB 2090639I have very little experience in management of the virtual computer.  However, I'm running a server of VRTX Dell (3 blades) (ESXi 5.1.0 Update 1) (currently 13 Windows Server 2012 R2 VM).Last year, after receiving notice of the possi