This content has been marked as final.
Show 3 replies
-
1. Re: Save as existing file to add few letters
vandy88 Nov 11, 2014 10:57 PM (in response to Murali_Vetha)Replace the 16th line with the below code:
app.activeDocument.save(new File(myIndFile.path + "/" + myIndFile.name.replace(".indd", "") + "_Flowed.indd"));
Vandy
-
2. Re: Save as existing file to add few letters
Murali_Vetha Nov 12, 2014 2:32 AM (in response to vandy88)Superb vandy
-
3. Re: Re: Save as existing file to add few letters
Kai Rübsamen Nov 12, 2014 7:29 AM (in response to Murali_Vetha)Hi Vetha,
I’ve no idea, if this is good practice, but for me this works too:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT; var myDoc = app.open( File.openDialog( "Select InDesign File" ) ); myDoc.properties = { textPreferences: { smartTextReflow: true, limitToMasterTextFrames: false, deleteEmptyPages: false, addPages: AddPageOptions.endOfStory } }; myDoc.textFrames[0].place(File.openDialog ( "Select Word File" )); myDoc.save ( new File ( myDoc.fullName.toString().slice(0, -5) + "_Flowed.indd" )); app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;Notice, that you get an error with your and my version, if you click cancel in the dialogs. That should be checked too.
Notice also, that smart text reflow will not work, if the textfame on page 1 is not a primary textframe or a master text frame (in older version).
If there exists better solutions, it would be great, if the advanced scripters share them with us.
–Kai



