Remove All Missing Links with frames

How can I make a script to remove all missing links with frames In indesign?
var doc = app.activeDocument;
var links = 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 try this script, but still remain a frame, what's wrong with that?

@Harvey – in priciple nothing's wrong with that.
But you need only to remove the parent.parent of the found link.
You could also resolve the object that is behind parent.parent to make sure it will work:
var myContainerToRemove = links[i].parent.parent.getElements()[0];
myContainerToRemove.remove();
No container, no image, no link ;-)
Of course that will leave a container frame behind, if the container of the graphic is itself nested into another object.
This could be a Texts object (together with a text frame) or a SplineObject like a Rectangle, Oval, Polygon, a Button as well as a State inside an MSO…
A remnant could also be a Group object containing only one page item…
Depends on how the page items are used and the layout is constructed.
Uwe

Similar Messages

  • How Can I Remove All the Links in a Document?

    I want to remove all the internal and external bound links in
    a number of my html documents. Is there any way I can do this with
    one action. I tried using Control + F on </a> and replacing
    it with nothing and that works. But Control + F on <a
    href="URL"> doesn't work as the url for that is different every
    time.
    Is it possible to remove all the links in one sweep, I hate
    to do it manually one by one as there are just so many?

    Tanim23 wrote:
    > Is it possible to remove all the links in one sweep
    Yes. In the Find and Replace dialog box, set Search to
    Specific Tag, and
    select a in the drop-down menu alongside. Then set Action to
    Strip Tag.
    You can do this in the current document, a particular folder,
    or the
    entire site, depending on what you select in the Find in
    drop-down menu.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Trying to install final cut express keep getting error message "FCE" can't install on this disk.  A newer version of this software already exists on this disk.  Have remove all FCE elements with no success.

    Keep getting error message "FCE" can't install on this disk.  A newer version of this software already exists on this disk.  Have remove all FCE elements with no success.

    http://www.digitalrebellion.com/fcsremover/

  • Is there a way to copy all missing links

    Hi,
    I have a document a client delivered with 128 missing links. Is there a way to copy the file names/paths to the clipboard all at one time, or do I have to do each one separately?
    Thanks

    you can:
    in the link panel options, check the "path" check box in the show column - column.
    then go back, select all the missing links in the link panel, click the panel fly out menu, copy info>copy info for selected links.
    Paste the info..

  • Is ther anyway to remove all tunes marked with the !

    I had a system failure and lost a large amount of my library which now shows with the ! and I want to get rid of them and selectign and pressing delete is not an option as there are too many to do. I do not wnat to delete all and re read them in, althought that may be the last resort. Even being able to sort them so I can easily select all and delete them woudl be usuefull
    Thanks

    "bcrs" <[email protected]> wrote in message news:[email protected]​ups.com...
    Hi all,
    Im new to this group. I need suggestions and comments from you all.
    I came to know that the password is stored in vi itself when we protect
    the vi.(im not sure about it, if anyone knows it please let me know ).
    If the password is not stored in vi itself, where is it stored ?
    So Is there anyway to open the vi in HEX code format and remove the
    password?
    Thanks in advance
    regards
    Bharat
    Probably (I wouldn't know, reversing is illegal , the password is a hash of the password and the vi data/code. So removing it would be as simple as removing the hash from the file in a hex editor. But LabVIEW won't open it, because the hash is wrong.
    Hope it help (but I guess it won't).
    Wiebe.

  • Mystery Missing Link

    Everyone,
    I have what I hope to be a simple issue. I have an InDesign CS2 artboard which is reporting a missing link that I cannot locate. I have checked the master page as well as all layers. When I select the "Go to link" button, nothing happens. The link information has nothing listed in the "Page" field.
    I've also tried relinking to another PDF, in hopes that I could then delete it, but nothing happens when I select Relink.
    Anyone have any idea as to how I could locate and remove this missing link?
    Matt

    If it was overset in a text frame it would have "OV" next to it in the Links Panel. "PB" means it's on the pasteboard.
    If the size of the pasteboard changed it may be off the pasteboard.
    Try increasing the width (add a new master page add more pages to that master page) and the height in the Preferences.
    Check to see if the image appears somehow.
    Also Check the Story Editor for any anchors that have a red line beside it, although this should show up in the links panel as "OV" as mentioned earlier.

  • The Missing Link

    I had to create another user on my Mac, in order for Link to work. I've scanned my computer, did everything one does to remove all files associated with an application, but there must be one file still there that is causing havoc. Any know what that file might be.
    What happens is - From Page 1, it goes directly to page 2, without stopping at the sign in page.
    What file do I need to delete before installing again?
    Thank You

    Hello sfebb, 
    Welcome to the forums. 
    I would suggest you contact your mobile network provider and ask that this issue be escalated to BlackBerry for investigation. 
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Update Missing links

    I would to batch the process of changing document to inches & update all missing links, save & close. The images are located in a folder in another volume. The script is changing document to inches but it is not updating the missing links. In what part of the process I'm failing? I see --> error number -1708
    set source_folder to choose folder with prompt "Select folder containing Indesign Documents"
    tell application "Finder" to set theFiles to files of source_folder whose name extension is "indd"
    set myFolder to choose folder with prompt "Select the folder containing the graphics you want to update"
    tell application "Finder"
      set myFiles to every file of folder myFolder
    end tell
    repeat with oneFile in theFiles
      tell application "Adobe InDesign CS4"
      set user interaction level of script preferences to never interact
      activate
      set myDocument to open (oneFile as alias)
      tell myDocument
      --++++++++++++++++
      tell view preferences
      set ruler origin to page origin
      set horizontal measurement units to inches
      set vertical measurement units to inches
      end tell
      end tell
      tell document 1
      set theLinks to (every link whose status is link missing)
      repeat with i from 1 to count of theLinks
      set thelink to item i of theLinks
      set theName to name of thelink as Unicode text
      set newpath to (myFolder as Unicode text) & theName
      try
      relink thelink to newpath
      end try
      end repeat
      end tell
      close myDocument saving yes
      end tell
    end repeat

    anyone got any other ideas about why some of the picture links are being listed as modified? It's an exceptionally annoying quirk, for the last 7 days the links on a 40 page catalogue the links were all fine, this morning however on opening the document it listed over 100 of the images as modified when nothing has been done to them.
    When I actually update the picture links in the links palette, in the details panel for the picture the modification date does not change after updating the links, it's the date that it was placed that does change - not sure if this will be of any help in trying to solve whatever's causing this issue, as mentioned above it's exceptionally irritating that it happens and is something that's putting other people off using InDesign over Quark as Quark doesn't seem to suffer this problem, and it would be worse if it happened on some of the other catalogues we do as they're 80 - 100 pages in size!

  • Configuring instanceconfig file to show all the links except return.

    Hi All,
    I have used the following java script to remove all the links in the drill down report. But now we have requirement to show all the links except return link.
    <style>
    .ResultLinksCell
    display: none;
    </style>
    I have come across the link where srini has suggested to configure instanceconfig.xml file with addition of following elements. I was trying to understand how this prevents only hide the return link. I have tried it in instanceconfig.xml but without any success. Any suggestions for this scenario
    {code} Disable or Hide return link - Business Intelligence Suite Enterprise Edition{code}
    <ServerInstance> <Analysis> <InteractionProperties> <InteractionPropertyAddRemoveValues>false</InteractionPropertyAddRemoveValues> <InteractionPropertyCalcItemOperations>false</InteractionPropertyCalcItemOperations> <InteractionPropertyDrill>false</InteractionPropertyDrill> <InteractionPropertyGroupOperations>false</InteractionPropertyGroupOperations> <InteractionPropertyInclExclColumns>false</InteractionPropertyInclExclColumns> <InteractionPropertyMoveColumns>false</InteractionPropertyMoveColumns> <InteractionPropertyRunningSum>false</InteractionPropertyRunningSum> <InteractionPropertyShowHideSubTotal>false</InteractionPropertyShowHideSubTotal> <InteractionPropertySortColumns>false</InteractionPropertySortColumns> </InteractionProperties> </Analysis> </ServerInstance>
    Thanks,
    Sushil

    Thanks for your reply. <div align=center>Return</div>--> creates link in the main report, but does not remove only Return link but all the links. I have updated the https://forums.oracle.com/thread/2557621 , sorry I completely forgot about this.
    Sushil

  • PO Service not link with AP invoice service

    Currently usiing SBO 2007A, SP-00, PL 49.
    I have 1 PO service. Base on this PO service, I create AP Invoice service.
    The account no. use in PO service is different from account no. use in AP Invoice service. Since account no. have been overwrite in AP Invoice.
    PO service is missing link with AP Invoice.
    When we open again the PO we couldn't find target document.
    Also same when we open AP Invoice, we couldn't find base document, which is actually the PO.
    Only in AP Invoice's remark we can find the PO no.
    Also in the database, in AP Invoice table base document no. is blank.
    Also it cause the PO not automatically close.
    Previous PL, this error not exist.
    Any one can help.
    Thanks in advance,
    Surya

    Hi,
    Please check Note No. : [ 1334491|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1334491] which explains the reported issue.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • When trying to access music stored on my icloud i get the following warning 'This computer is already associated with an Apple ID'. itunes support say they have 'released' all devices associated with my account but i still have the same problem-any ideas?

    cant access music sored in my icloud when using my lap top. any ideas?

    iTunes imposes a 90 day wait period before a device can be associated with a different ID.  If iTunes support only removed all devices associated with your ID, this does not override the 90-day wait period.  From http://support.apple.com/kb/HT4627:
    "Removing a device from your Apple ID does not override the 90 day timer. The timer must complete 90 days from the day the device was associated before it can be associated to another Apple ID."
    Unless iTune support can override the wait period for you, you have no choice but to wait if you want to download it from iCloud.  If your purchases music is on any of your iOS deivces, you can transfer it to the iTunes library on your computer by authorizing your computer for the Apple ID(s) used to purchase the music (in iTunes, Store>Authorize This Computer), then connecting your device to your computer, opening iTunes, and going to File>Devices>Transfer Purchases.

  • PDF goto named destination link with current zoom level

    Hi,
    I am created PDF file from 3b2 software with many links and bookmarks, The links with in documents are created with named destination bookmark names.
    When I am click the link to navigate with in document it will goto the bookmarked location and zoom level will changed into “FIT TO WIDTH” but I am want to navigate over the document with current zoom level from the link where I am clicked.
    For this process I am tried one method that is javascript action in link.
    Using link properties
    Action -> Add Action -> Select Action  (Run Javascript)
    Script
    main()
    function main()
    var zoom = this.zoom;
    this.gotonameddest(“bk1”);
    this.zoom = zoom;
    By this method I am get what I am looking but I am having one problem,
    First I will goto that book marked page with and after only it will fit to the current zoom level, so when I am go for previous view it will goback to "FIT TO WIDTH" zoom level, so this method failed.
    And also I am unable to edit all the links in my PDF document by Manually.
    So please advice me what is right way to navigate over the document with current zoom level from link where I am clicked.
    Note:
    The output PDF document will contain 100 number of links so I want to update all the links with my requirement by automation.
    Is there is any way to handle this process by Acrobat SDK with C# , .NET
    Regard
    Thirusanguraja V

    Thank you Very much,
    If you do't mind could you give me sample PS file with,
    Destinations specify a particular location in a file, and a zoom factor.
    The zoom level must be current zoom level of the page where i am link click.
    Sample PS syntax i am tryed:
    [/Dest /bmkaff1 /Rect [2000 3062 2100 2886] /View [/XYZ 0 0 0] /LNK pdfmark
    Reference I am used for this:
    pdfmark Reference
    © 2006 Adobe Systems Incorporated. All rights reserved.
    Adobe® Acrobat® SDK 8.0 pdfmark Reference for Microsoft® Windows®, Mac OS®, Linux®, and UNIX®
    Edition 1.0, November 2006
    Chapter 3 : 3 Actions and Destinations................44

  • Remove hyperlinks from links inside email

    I was wondering if you could create an exchange transport rule that would check all incoming email for hyperlinks, if it seen one, it would remove the hyperlink and change it just into text.

    Hello,
    Please try to build a transport agent to remove all HTML links from an incoming SMTP messages. And you need to use Visual Studio to realize it.
    You can refer to the "Setting up the Environment" section in the following blog:
    http://blogs.technet.com/b/exchange/archive/2013/01/21/how-to-write-an-exchange-2013-transport-agent.aspx
    If you have any feedback on our support, please click
    here
    Cara Chen
    TechNet Community Support

  • How to Hide the Missing Links on PB (Pasteboard)?

    Hi everyone,
    Is there any setting that can hide missing links that are on the Pasteboard?
    I have to regular export a 16 page brochure document and there is a lot of ads/graphics that I keep handy on the Pasteboard.
    But I don't want to see any missing links for PB items when I make the pdf to send to the client or the printer.
    Thanks
    Barbara

    Barbara...you said "
    I have to regular export a 16 page brochure document and there is a lot of ads/graphics that I keep handy on the Pasteboard.
    But I don't want to see any missing links for PB items"
    the items you keep on the pasteboard shouldn't be missing--if they show up as missing in the links pallet--then they are in fact missing--and will throw an error when making a PDF--if you over ride the error the PDF will be made using the 'screen' resolution of the graphics and such--which will be low quality!
    find and relink all missing links--then save the document and keep in in the same location--links get lost when the documents are moved
    (once you have all the links relinked...'packaging' the document will gather everything into one folder, that can be renamed or moved without losing the links-make sure to check the box in the package dialog that says 'include links on hidden layers').

  • I installed FoxTabs and it seems to have removed all of my Links and Organized Link pages I had set up with FastDial. How can I get my FastDial back?

    FoxTabs looked pretty cool and I was interested in using it, but I didn't expect it would remove all of my FastDial information that I have built up over the past 5 years!
    I would still like to do this, but I really need the FastDial pages restored, I have links I do not even remember and would be hard pressed to even come close to restoring what seems to be lost. It still shows FastDial as an installed add on, but it doesn't open to it. Please help!

    is it compatible with Firefox 5.0 ??

Maybe you are looking for