Hi,
Which OS in use?
Your "myWordFileName" includes a file extension, I am afraid.
try to modify last line (watch out slash vs backslash difference):
app.activeDocument.save(new File(myIndFilePath + " / " + myWordFileName.replace(".doc", ".indd") ) ); // is it ".doc" ???
There is a syntax error as well:
You can not use a document property to file (I mean "filePath")
so the lines (07-09) which are opening a doc should be moved up - before "myIndFilePath" creation.
and modify it to:
var myIndFilePath = mydoc.filePath;
Jarek