Newbie: Placing images in a text - JS/ID CS4
Hello,
I'm not very experienced with JavaScript an InDesign so please be patient. I tried my best but somehow I seem to be unable to get this script running the way I want to.
I've got a text which contains several images, or rather: the file-names are given in the text and I want to replace them with the actual pictures.
I did manage to extract the file-names and wrote the name into a "new File", using a for loop. So it looks like this:
var _name=_story.paragraphs.contents;
var _file = new File (_folder + "/img/" + _name +"");
_story.paragraphs.place(_file);
This replaces the file-name with the image, however, the image now seems to be part of the text, so I can move it a little bit up and down but I cannot even move it to the left or to the right. This might be handy for placing the images exactly where they belong, yet it does disturb me. Especially since I now want to add captions beneath the images. I tried to use the same method for them but now I have two frames at the same place and I cannot move one of them.
Another problem is that some of the pictures don't fit into the type area. But I cannot move them upwards, because I added an objectStyle, containing text wrap information, but the text is only pushed away in a certain area, so InDesign forces me to place the image exactly at one position, otherwise the page will look very strange. However, I am unable to change this one "good" position.
I hope you understand what I mean.
My question now is: is there a way to untangle all those frames, to part the picture-frames from the text-frames/the story, so that they can be moved around freely on the paper?
I liked the way I placed the images, because now I can be assured that all the images are placed where they belong, but I would really like the possibility, to move pictures upwards, if the don't fit into the type area and I still have to add the captions.
Thanks for your help