I'm new to scripting InDesign, so apologies if this is a daft question...
I have an InDesign document. I have it set up with a single page with a single text frame. When manually enter more text than will fit in the text frame, a new page is created. The same happens when I add text to it via AppleScript.
At certain points, I add text frames at the end of the body of my text like this;
tell application "Adobe InDesign CS2"
tell front document
set theStory to parent story of text frame 1
set theColour to swatch "Black"
tell insertion point -1 of theStory
set theFrame to make text frame with properties {contents:"Blah", geometric bounds:{-10, 0.0, 0.0, 60}, fill color:theColour}
set properties of text frame preferences of theFrame to {inset spacing:{0.6, 0.6, 1, 0.6}}
end tell
end tell
end tell
...this works fine on the first page, but when I move beyond the first page, it falls over saying;
"Adobe InDesign CS2 got an error: This value would cause one or more objects to leave the pasteboard."
Can anyone point out where I'm going wrong?
Any help much appreciated!
Thanks
Rob
Important: This message is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of the communication is strictly prohibited. If you have received this communication in error, please notify the writer immediately by telephone and return the original message via postal service to the writer's attention at the above address. Thank you.
Watt Gilchrist Limited. Albion Mills, Albion Road. Bradford, BD10 9TQ
Registered in England
873405