I am pretty sure this has been asked before, but I cannot find it in the forum.
Is there a way to include in the JS a copy method to select an image, and paste into a text frame as an inline graphic? I have placed images as inline graphics before with JS, but I was using a path to a folder. In this new case, I cannot point to a folder for the image as the image is not on an attached volume, I am carrying out this script on a document already populated, but with missing links.
I hope this makes sense to someone!
It can indeed be done that way. You just have to select the insertion point (and I mean select in this case) before issuing the paste.
I prefer to use a library to achieve this goal, along these lines (this code assumes I already have a library open):
var myTableTab = myDoc.textFrames.item("TableTab").getElements();
// Move TableTab inline using library for temp storage
var temp = projLibrary.store(myTableTab);
An advantage of this approach is that it leaves the clipboard unchanged.
The library method makes sense, I will give it a go when I get a mo.