Relink files in Indd CS5, js

Hi,
I need to relink files in InDesign to the Link subfolder and what I have is not working:
myDoc = app.activeDocument;
myDocPath = myDoc.filePath;
var indesignPages = myDoc.pages.length;
var p = 0;
for (var p =0; indesignPages > p; myDoc.pages[p++]){
for (var a =0; a<myDoc.rectangles.length-1; a++){
try{
var myArt = myDoc.pages[p].rectangles[a].graphics[0];
    if (myArt.isValid ==true){
        var myArtName = myArt.itemLink.name;
        var myArtLocation = myDocPath + "/Links/" + myArtName;
        alert (myArtLocation)
    if (myArt.itemLink.status == LinkStatus.LINK_MISSING){
        myArt.itemLink.relink (myArtLocation);
    if (myArt.itemLink.status == LinkStatus.LINK_OUT_OF_DATE){
    myArt.itemLink.update (myArtName);
}catch (e){}
And I am not sure why.
It's running to the end and not giving me any errors, but the links remain unlinked.
The location alert shows correct location.
Thank you for your help.
Yulia

Hi,
try this:
var myDoc = app.activeDocument,
myDocPath = myDoc.filePath,
myLinks = myDoc.links.everyItem().getElements(),
p, a = [], myArt, myArtName, myArtLocation;
for ( p = 0; p < myLinks.length ; p++) {
     myArt = myLinks[p];
     myArtName = myArt.name;
     myArtLocation = File(myDocPath + "/Links/" + myArtName);
     if (!myArtLocation.exists) {
          a.push(myArtName);
          continue;
     switch (myArt.status) {
          case LinkStatus.LINK_MISSING:
               myArt.relink (myArtLocation); break;
          case LinkStatus.LINK_OUT_OF_DATE:
               myArt.update(); break;
          case LinkStatus.NORMAL: break;
          default: alert ("Can't relink " + myArtName); break;
if (a.length > 0) a = "Files not found in 'Links' folder:\r" + a.join("\r");
else a = "OK. Done!";
alert (a);
Jarek

Similar Messages

  • I am running InDesign CS5.5 and trying to open an In Design File but getting an error message. " Cannot open the file "PDavidLCover.indd". Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing, or the file

    I am running InDesign CS5.5 and trying to open an In Design File but getting an error message. " Cannot open the file "PDavidLCover.indd". Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing, or the file me be open in another application."Please help I really need to get this file open.

    Since you've shown us the folder contents it's a good bet it isn't in use (no lock file). And it doesn't look like the file is mis-named as there doesn't seem to be anything else there that would be the .indd file (but just in case, open it in TextEdit and paste the first few lines here so we can see what the file header says), so the most likely case is the file is damaged. Is that on a removable device of some sort?
    You can try the tool at Repair corrupt InDesign Adobe files on Mac OS X  or send me a link to the file by private message and I'll try the recovery tool I have for Windows.

  • Cannot open indd file in either CS5 or CS5.5

    I downloaded CS5.5 on my laptop this afternoon. I then opened a CS5 file, worked on it, then saved. Now I cannot open the file in either CS5 or CS5.5. Is says InDEsign may not support the file format, the file is missing, or it is opened in anaother application. Does anyone know how I can open this file?

    Just to be clear:
    It won't open in either version. I created the file in CS5 (school computer lab), worked on it in CS5.5 (on my personal laptop connected through the server), then tried to open it on a school coputer using CS5. The file will not open.
    Once you edit a CS5 file in CS5.5, it becomes a CS5.5 file and you will not be able to open it in CS5.
    Make sure you are running the version you think you are, and don't double-click the file, but actually use File > Open from within InDesign CS5.5.

  • INDD CS5 print booklet impose problem

    Using iMac with Lion and INDD CS5.
    Im doing a 28 page booklet on legal paper (8.5x14), so each final page is 8.5 tall by 7 wide.  I used the Print Booklet feature to make an imposed PDF and the preview looked fine, but the resulting ps file opens and its "imposed" but it only is getting the left page and part of the right page, almost as if the page size its "printing" to is not legal. But I can't find where I make sure its destination is legal paper. Anywhere in the print or settings where its specifies paper, its grayed out or unavailable.
    Any help?

    This is a 100% Adobe issue, I've been following a tutorial off the Adobe site, printing to a PS file, and it still screws up.
    BUT......
    Use FIX 2 off this link, worked great for me.
    http://yourartdirector.blogspot.com/2010/11/indesign-print-booklet-issue-solved.html

  • Cannot open file exported from CS5 as .idml into CC2014.

    I'm trying to open a file created in InDesign CS5 in the newest CC version of InDesign.
    It is a large (2GB) file comprised entirely of placed images.
    I found a thread that suggested exporting as idml.
    I did export from CS5 as idml which made the file size a mere 195 MB.
    When I tried to open it in CC2014 I got the error message:
    Cannot open the file "name.indd"  Adobe InDesign may not support the file format, a plug-in
    that supports the file format may be missing, or the file may be open in another application.
    I had quit from CS5 before attempting to open the file in CC2014.
    I had thought that exporting as .idml would change the file type suffix from
    .indd to .idml but I'm not in the weeds enough to be sure about that.
    Any thoughts?
    Thanks in advance.
    Roger

    I had thought it might be.
    I preserved my original (created in CS5) and saved a copy
    to try it in CC 2014. The copy wouldn't open in CC.
    I deleted this copy and tried again with a new copy
    Tried to open in CC - no go.
    Opened the new copy in CS5 - no problem.
    If the file were corrupt, would it still open in CS5, or is this
    a forward compatibility issue?

  • InDesign CS6 files shown with CS5.5 icons

    I've recently installed CS6, I ended up with a lot of icon and extension problems, so I uninstalled CS6, ran Adobe Script cleaner and reinstalled. Everything is now in order except for one thing. The .indd files shows the CS5.5 instead of the CS6 icon. The standard program is set to InDesign CS6 (D:\Program Files (x86)\Adobe\Adobe InDesign CS6\InDesign.exe). I also checked the registry and everything is in order.
    Opening the file results in CS6 starting up. So I don't know what's up... But it is quite annoying, I just want everything to be in order. I even tried download third-party software like 'FileTypesMan', to no avail. Does anyone know a smart work-around?
    Notice the screenshot below, the programe is set to CS6, the icon in the lower right corner is set to 5.5
    Thanks in advance!

    This topic can be closed.
    It seems to have fixed itself, I have no idea how or why. But when a miracle happens one does not ask questions. ;-)

  • When I drop an .indd cs5 document on icon Indesign cs4 starts up! How can I change these settings

    Hi everybody,
    The solution of the above written problem should be so simply however I'am not able to solve this. I want te create pdf's with drag and dropping a CS5 Indesign file on the icon. Tried to change the preferences but no luck...
    Let me know if you have a solution :-)
    Remco

    Although this sohould be asked and answered in InDesign/CS5 forum. it's not really an issue of InDesign. Its an issue of the Mac operation system
    close up and quit everything back to finder.
    Next locate a bunch of indd cs4 documents.
    highlight them has to be a minium of 5.
    now from finder go to file > Get summary Info.
    next locate button showing what applications opens the files.
    click on button and choose InDesign CS5.
    now under tha button  click on Change All ... and click Okay.
    Now all your indesign files will open with the indd CS5 application.
    if you would rather just open an individual file if you have a 2 button mouse
    Click the right mouse button on the desired file.
    hold until context menu pops up click and hold on open with...
    a new menu gets built of desired applications
    choose InDesign CS5 and it will open.
    This allows a given file to open with desired application but doesn't change file types.

  • INDD CS5.5 freezes when trying to export IDML

    Hi there,
    For a couple of days I'm trying to Export a 23.2MB INDD file in IDML, but after a few seconds it freezes:
    Adobe InDisign CS5.5 has stopped working
    A problem caused the program to stop working correctly.
    Windows will close the program and notify you if a solution is
    available.
    I have INDD 7.5.1 running on Windows 7; 64bit.
    Any suggestions?

    I have tried to break up the file and export two pages a time, but in vain.
    Create a new document and go to the Pages panel and choose Move Pages and move your pages to the new document.
    See if that clears it up. If not, try a single page. If it works, when you can narrow to the problem.
    Is there a possibility to cut and past INDD CS5.5 to INDD CS4 ?
    Actually, yes. Select the page elements in CS5 and Export to a Snippet (in fact, you might even be able to drag and drop to CS4...).

  • Can't export an EPS file from Photoshop CS5 and open in Illustrator CS5.

    I'm on Mac OS X Lion 10.7.5
    I am making DVD covers for print. The barcodes for the DVD covers have to be done in Illustrator. But the original designs are done in photoshop including the text. For years this hasn't been a problem. Right before adding the barcodes I create an EPS file from photoshop, open that file in Illustrator and all my text is automatically coverted to perfect crisp clean vectors, viola! I add the barcodes and export the PDF for the printers.
    But now I can't open my EPS files in Illustrator CS5 even though I'm exporting them the same way I always have from Photoshop CS5. Illustrator says... "The operation cannot complete because of an unknown error." --> Note it does not give an error number after this warning like I see it does for so many other people.
    I have been trying to fix this for over 10 HOURS spanning 2 days! I'm infuriated I can't get help from Adobe on this and have read all the forums and don't see my problem listed anywhere.
    I've tried:
    - Deleting the .plist file and the Settings folder & resetting my permissions
    - Uninstalling and Reinstalling Illustrator
    - Turning off all other applications
    - Creating more disk space on my hard drive (even though I have 200gb available)
    - Restarting the computer
    - Disabling my Font book and still I can't open the EPS file
    I thought maybe it's possible it's the font I'm using Fontesque OT so I even tried converting text to objects prior to exporting the EPS file from photoshop to illustrator and turning off my font book, but still it won't open. And if I open the PSD directly in Illustrator, text comes out a bit fuzzy in the PDF I export.
    If anyone can provide any solutions I would be so grateful! I'm at my wits end here, this should have taken under an hour to do and now it's ruining my entire weekend. I'm completely panicked because I was suppose to have these to my client over the weekend so they could turn them in for Print frist thing on Monday morning and of course Adobe provides no chat support or phone support after 7pm on weekday or on the weekend which is when this all started.

    I never even thought of reinstalling photoshop, but I think this was a font issue. I'd never saved an EPS with Fontesque OT Regular enabled, only Fontesque OT Bold. Somehow I think the font was causing the problem because ridding the font from the equation allowed me to open the EPS file.
    After 12 HOURS of trying different things I found a WORK AROUND...
    I had to:
    - Select the Text in Photoshop (with Fontesque OT enabled)  --> Select Create Work Path --> Covert to Shape on each of the text items
    - Save EPS file out of Photoshop
    - Disable Fontesque OT font in Font Book
    - Then open EPS in Illustrator add in my Barcodes and export the PDF
    (the barcodes have to be added in Illustrator because they need to be pure 100% black with no CMYK color in them. You can't save them out of Photoshop that way, only Illustrator, otherwise I would have made my pdf straight out of photoshop like any other normal human
    This work around is the only way I could get the EPS files to open in Illustrator and still have the text remain super crisp like a vector.
    NOTE to others in the future about crisp text from Photoshop to Illustrator:
    - Simply "converting to shape" did not preserve the vector. You have to Select Create Work Path --> then Covert to Shape on each of the text items (with the font enabled) for this to work and preserve the crispness of the text. Even creating "smart object" did not truly preserve my vectors or the text crispness in the EPS file once I imported it into Illustrator.
    DrStrik9 thank you SO MUCH for trying to help me. You did give me ideas that helped me figure out the workaround and also helped me feel not so alone as I struggled through this. I'm going to follow up with your other suggestions about reinstalling photoshop and also checking my RAM, etc. But I just want to that you so so so SOOOO much for all your time and consideration in this matter. I hope you have a wonderful amazing week ahead and that someone does something very nice and thoughtful for you too

  • Open a URL link in the same window as SWF file in indesign CS5

    Hello,
    I am trying to create a SWF file using indesign CS5.  I have created buttons and placed in URL links but they always open another window.  I would like to know if there is a way to have the URL open in the same window that the SWF file has been created.  I tried, putting "_self" to target it in the URL bar, but nothing works.
    Thanks in advance
    TK

    Okay, I found the code but I can't get it to work locally.  If you have a web server maybe you can upload the files (swf and html) after you Publish them:
    import flash.net.URLRequest;
    import flash.events.MouseEvent;
    var myURL:URLRequest = new URLRequest ("http://www.google.com");
    testlink.addEventListener(MouseEvent.CLICK, clickText);
    function clickText(myevent:MouseEvent):void {
    navigateToURL(myURL, "_self");
    you have to have on the stage a link element called "testlink" (see the code above) which would be a Movie Clip with the label testlink.  It can be anything from InDesign:  a button, a rectangle, a circle, a graphic, you get the idea.  Just select that object in Flash and label it testlink or anything you choose but if you change the name from testlink also change the name in the code snippet where the line "addEventListener" is.

  • NEF file opening in CS5 as a smart object

    My CS5 recently started opening up all my Nikon raw files as smart objects. I don't want that. How do I make it stop? This never happened before nor am I aware of me changing any of the settings. Any help would be great. Thanks

    I never changed anything in my preference that i'm aware of. I don't even
    know what smart objects are. Nor did I want it in the first place.
    To clearify. I usually open a folder containing NEF files and then drag and
    drop the file over the CS5 program in my dock. Then it brings me to the
    Camera Raw menu and I click open and then it opens the file as a smart
    object. TIA

  • How do I open files in InDesign CS5.5 CS5?

    How do I open files in InDesign CS5.5 CS5?

    Hi, are you trying to open up a CS5.5 document in CS5? If so you need to export the docment while in InDesign CS5.5 to the IDML format.
    Please refer to this document: http://help.adobe.com/en_US/indesign/cs/using/WSa285fff53dea4f8617383751001ea8cb3f-6d52a.h tml#WSa285fff53dea4f8617383751001ea8cb3f-6d4da

  • How can I convert Pagemaker 7.0 file to InDesign CS5.5?

    I have problem with open pagemaker file to InDesign CS5.5. Before I was using PageMaker 7.0. Now I have InDesign CS5.5 & tried to convert my old file to InDesign. But I am having problem to convert. When I convert Pagemaker File, all text looks uncleare and unredable. I can't edit text and tables. Below is a image after converting from pagemaker.

    Start by reading the InDesign Help section on opening PageMaker files.  It suggests some steps to do IN PAGEMAKER BEFORE you do the conversion:
    •If the PageMaker file or its linked graphics are located on a network server, floppy disk, or removable drive, it may not open as expected if an interruption in data transfer occurs. To prevent data transfer problems, copy documents and their links to the hard disk, preferably in the same folder where the PageMaker publication is stored, before opening them in InDesign.
    •You may want to use Save As in PageMaker to clear unnecessary hidden data.
    •To ensure that all links are maintained, copy all linked files to the same folder where the PageMaker publication is stored.
    •Make sure that all necessary fonts are available in InDesign.
    •Repair broken graphics links in the PageMaker publication.
    •If you have a problem converting a large PageMaker document, convert portions of the PageMaker file separately to isolate the problem.

  • I created a file in Photoshop CS5 (a photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When the Photoshop and Illustrator files are placed in InDesign, they look blurry - whether viewed in InDesign, printed, or saved as

    I created a file in Photoshop CS5 (a photo) and another in Illustrator CS5 (a graph) to place in my InDesign CS5 brochure. When the Photoshop and Illustrator files are placed in InDesign, they look blurry - whether viewed in InDesign, printed, or saved as a PDF. Can anyone give me some tips on how to fix this? Thanks!

    Ask in the program forums
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll

  • How can I process a Sony A7 RAW file into Photoshop CS5.

    How can I process a Sony A7 RAW file into Photoshop CS5.  I tried the file DNG converter 8.3, but it did not work.  I was able to download it, but upon reading the memory chip from Photoshop CS5, it reads the jpg files fine, but not the RAW files.  I thought the DNG converter 8.3 was the right file, but apparently it is not.  Perhaps I need to do something in Photoshop CS5 to initiate it, or place it in a particular directory.. Please help.

    First of all, you should have used the Adobe DNG Converter 8.6, not an old, obsolete version.  Always use the very latest version.  8.3 was simply the first ACR version to support your camera model, that's all.
    Note that the DNG Converter works only on folders, not on individual raw files.  Put all your Sony raw files in a folder and run the Converter on that folder containing the raw files.
    I have absolutely no clue as to what on Earth you mean by : "upon reading the memory chip from Photoshop CS5".
    You also need to make sure that CS5 is fully updated.  You cannot rely on the highly and notoriously unreliable Adobe auto updater to tell whether you have the latest update installed or not.
    I still have no idea what platform you are on, Mac or Windows. Please read the following for next time:
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them, etc.,
    someone may be able to help you (not necessarily this poster).
    A screen shot could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

Maybe you are looking for

  • New variable in Report Painter - GRR2

    Hi, Can i create a variable with a value of table PROJ, the value is in Z field of table PROJ? I need to create a formula in report painter to take the field value PROJ table and multiply by the actual costs. Many thanks. Regards.

  • Can I set up multiple webcams on one macbook pro?

    I'm just curious as too how many cameras I can connect to my laptop. I'm doing a video podcast, I have all the software I need to stream live from my desktop and switch between multiple devices. I'm just trying to figure running 3 cameras to my lapto

  • STOP POSTING TO PROFIT CENTER BY VALIDATION RULE

    Dear all gurus, I am being asked by my user how to stop posting into a profit center.After searching the forum, i found an answer :"For blocking the posting to profit center, use validation rule with a check that (Profit Center=12345)->FALSE" I do no

  • What's with the beach ball of death?

    I see it more frequently than when I first purchased my macbook.  Don't get me wrong, I love my mac and it's still faster than anything out there but why does it appear more than before especially when using Mail, iPhoto, and especially iTunes?

  • Phone Compatibilty

    Are all Java enabled mobile phones compatible with J2ME? Do we need to specifcially design a J2ME application for all mobile types or is there a Gobal option?