Swap Two Items on Your InDesign Page

Ray asked: I'm wondering if there's a way to swap two objects on a page without clicking and dragging to resituate them on the page? I originally responded to Ray...

Ray asked:

I’m wondering if there’s a way to swap two objects on a page without clicking and dragging to resituate them on the page?

I originally responded to Ray with a “sorry, no.” But then a little script caught my eye! Marc Autret (a.k.a. Amar Cutter) posted a little script on his French site BlogNot! called SwapItems. I wonder if you can guess from its name what the script does?

You may have seen a mention of Marc in our post on scripts, as he also wrote a cool script for making indexes based on a list of words. But not everyone needs indexes! Some of us just need to swap objects around, and this script makes it really easy.

For example, you may have one image on the pasteboard and one on the page, but you’re not sure which you want to use. Just swap them back and forth until you like what you see.

There is no user interface; you simply double-click on the script in the Scripts panel (Window > Automation > Scripts) and whatever two objects are currently selected get swapped on the page.

If the two objects are of different size, you can control which handle coordinate is swapped by first selecting it in the Reference Point proxy thing on the left side of the Control panel. For example, if the lower-left corner is selected, then SwapItems will move the two objects, putting the lower-left corner of one where the lower-left corner of the other one was.

Bookmark
Please login to bookmark Close

This article was last modified on December 19, 2021

Comments (15)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...