Hi,
...
Everytime I run a script in Indesign CS3 I get the following error:
...
So, can you run a script in other Indesign versions with no errors?
...
102 var TF = addPageWithTF(masterPage); 103 TF.place(aFile); ...
Both lines use variables created outside of part of code you pasted here. Did you check their values (i.e. - debug breakpoint set and "DataViewer" opened in ESTK)
What is the result of function addPageWithTF() - a page or a textFrame?
Moreover:
You can add a second parameter to method TF.place(file, showingOptions), like:
TF.place(aFile, false);
Jarek