hi,
I am trying to write a script that can import files such as xls and txt in indesign. I am able to do so, if the file is not a variable.
First i try to open finder to select the file whereafter the file automaticly places itself in the document.
the code i have for the txts (which doesn’t work :s):
tell application "Adobe InDesign CS3"
set myDocument to make document
set myDocument to (choose file with prompt "Choose your text file")
tell application "Finder"
set myText to (container of myDocument) as text
end tell
end tell
tell application "Adobe InDesign CS3"
set mySpread to active spread of active window
tell mySpread
set myTextFrame to make text frame
tell myTextFrame
set geometric bounds to {"10", "10", "287", "200"}
end tell
end tell
end tell
set tempfilepath to (myText) as text
set MyHead to "blah-blah-blah"
tell application "Adobe InDesign CS3"
tell myDocument
place tempfilepath in myTextFrame
end tell
end tell
when i am able to make this work… it is my intention to do it for as well xls as txt with the same script… any suggestions…