Hi,
I was just wondering if someone could help me with the following problem:
All l’m doing is placing a text file into a text frame - sounds easy - test code below:
======
set boxContent to “HDPropane:textfile.txt”
tell application “Adobe InDesign CS2”
activate
set MyDocument to active document
try
set myframe to (text frame 1 of MyDocument whose label is "testbox")
«event K2 plac» (boxContent) with «class rtfo» without «class imot» given «class insh»:myframe
on error emg
display dialog emg
end try
end tell
This works OK and will overwrite the contents each time… the problem is when you link the text frame to another text frame… it still works fine if you run the script without having any contents in your text frames but as soon as you have some contents you get an error ‘import failed’ I get the same problem in CS, CS2 & CS3
I’ve even tried after the ‘set myframe’ adding set myframe contents to “” - adding this line was a little hit and miss sometimes it worked sometimes l got the same import failed message.
Regards, Gary.