3 Replies Latest reply on Apr 15, 2016 5:02 AM by Peter Kahrel

    Placing word to INDD template under Subfolders in the Same folder


      Dear all Amazing Scripters,


      I am working on a case, each folder contains 2 folders, one with word file and one with InDesign template.


      I have done some research and have got all the InDesign files from my subfolders,

      and now I want to use parent of absoluteURI of the InDesign files I found

      to get to the folder of my Word document, then place it in the InDesign file under the same parent folder.

      But when I tried there is an error message "invalid value for parameter “fileName” of method “place”. Expected file, but received ~/Desktop/.../myWordFolder/myWord1.docx"


      Below is part of my code,

      myWordDocsPath = myFiles[i].parent.parent.absoluteURI + /myWordFolder/;

      myWordDocs = Folder(myWordDocsPath).getFiles("*docx");



      What I am guessing is from the code above I got the file path or filename instead of the file itself.

      But I can't think of a way to get the file instead of the path or filename.

      Or is there a better way to do this?

      Thanks for any ideas or inputs....