Clipboard. How to copy and paste multiple items in a specific order

Since you'll probably come across this in other macros you write, try opening the Clipboard Histroy Switcher then stepping through your original macro with the debugger ("Start Debugging" in the KM menubar icon, then run your macro) -- watch what happens to the order of the clipboard entries at each step.

But the short answer is that you don't need all those variables, you are going one entry too far back, and forgetting that when you set the clipboard to a past entry that entry is brought to the front of the queue and everything that was in front of it drop one place back.

So something like this:

Names Surnames - Clipboard.kmmacros (6.0 KB)

Image

1 Like