Article View: adobe.scripting.indesign
Article #9505How to place image into text frame??
From: m.steiner
Date: Wed, 16 Aug 2006 08:38
Date: Wed, 16 Aug 2006 08:38
23 lines
1176 bytes
1176 bytes
Hi!
I want to place an image into a text frame! This is my script:
var myDocument = app.documents.add();
with (myDocument){
var myPage = myDocument.pages.item(0);
with (myPage){
var myTextFrame = textFrames.add();
myTextFrame.geometricBounds = ["0mm", "0mm", "297mm", "221mm"];
myTextFrame = place(File("cover.tif"));
}
}
The problem is when I start the script in InDesign the following error message appears:
JavaScript error!
Error Number: 48
Error String:"File or Folder does not exist"
Line: 15
Source: "mmyTextFrame = place(File("cover.tif"));"
Could anybody tell whats wrong with that??
Technical Details
Message-ID:
<3bc14736.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,3e466ed8bfbecf32,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: m.steiner@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: How to place image into text frame?? Message-ID: <3bc14736.-1@webcrossing.la2eafNXanI> Date: Wed, 16 Aug 2006 01:38:20 -0700 Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.ecp.fr!news.stben.net!webcrossing