placing image file with placedItem - JS
I have a blank CS4 doc. I can place a png image myimage.png into the document no problem using "Place..". I try to place the png image with JS and I get a "Expected file/folder error on line 3" . The script, document and image are all in the same directory.
var myDoc = app.activeDocument;
var mysym = myDoc.placedItems.add();
mysym.file = 'myimage.png';
mysym.position = [200,200];
I try using an absolute path to the image and it still gives me the error message. I tried to place myimage.eps also, with the same problem. Am I missing something obvious with the placeItem operation. Ultimately, I want the image to be embedded and not linked.
Thanks,
Mark