From the course: InDesign Secrets

350 Exchange or swap two images - InDesign Tutorial

From the course: InDesign Secrets

350 Exchange or swap two images

- [Instructor] I have two images that I want to switch. And let's say I want the frames to stay where they are. I just want to move each image into the other's frame. So, as is often the case in InDesign, there's a slower manual way to do this and a fast way using a free script. Let me show you the slow, manual way first, because it is an important technique. To swap these two images, I'll first duplicate them by clicking on the first one with the selection tool and then shift clicking on the other one to select both of them. Then, I'll option or alt drag. That makes a duplicate of those objects. Now, I'm going to double click on one image to select the image inside the frame. And I'll cut it to the clip board by pressing command X or control X on Windows. Now, I'm going to come over here and select the alternate frame, the original one, where I want to put this image into. And I'm going to go to the edit menu and I'll choose not Paste but Paste Into. Now that image that I cut replaces the image that was in there. Now let's do it to the other image. I'll double click on this one to select it, cut it to the clipboard, come over here and I'll use Paste Into and that too replaced the original image. Now you'll notice that the images are wrong size and position, so now I'm going to delete the duplicate frames just by clicking on those and hitting the delete key on my keyboard. And I'll select these two images once again, go to the Object menu, come down to fitting, and then I'll choose frame fitting options. I'm going to turn on the autofit checkbox then I'm going to tell it to fill the frames proportionately and set the crop amount to zero. You'll see, because the preview checkbox is turned on, that the images scale to fill the frame. Now I'll click OK. Okay, so that wasn't so hard but it is kind of annoying and it takes a few steps. So, now the moment you've been waiting for, how can I swap the images quickly with a script. Well, first you need the script of course and you can find that here on InDesignSecrets.com at this URL. If you scroll down this page, you'll find the link to download the script. Now, I've already downloaded this script and put it in my downloads folder. So, to install it, I'm going to switch back to InDesign, go to the window menu and scroll down to utilities. Here in the utilities menu, I'll choose scripts. Now I currently have no scripts inside my user folder. To add that script I'm going to right click on this folder icon and choose Reveal in Finder. Or, on Windows it'll say Reveal in Explorer. This opens the scripts folder and you'll see, inside of it, the scripts panel folder. Any scripts you put into the scripts panel folder get added to the scripts panel. In this case, here's the script I downloaded. You'll notice that sometimes when you download a script from a forum or a blog post, you'll see a little .txt at the end. I need to get rid of that. I need the suffix, the three letter extension to be .jsx. So I'm going to rename this by removing those four last characters. Now, I'm ready to install that script by dragging it into my scripts panel folder. All right, let's try it out. I'll switch back to InDesign and you'll see that immediately my script appears inside my user folder. To run the script, I just make sure that two frames are selected and then double click on the script. There you go, it swapped them. Let's try it again and now it's back to the way it was. Isn't that great? So, if you find yourself needing to swap your images around a lot, you definitely need this script.

Contents