Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Save as existing file to add few letters

$
0
0

Hi All,

 

This below coding is open indesign file and flow word file then save as in the same name. But now I need to add "_Flowed" with the before .indd extension. See 16th line. But if I run this coding result is e.g. Indesign.indd_Flowed. Please advice.

 

See my coding

 

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
var myIndFile = File.openDialog ("Select Indesign File");
var myWordFile = File.openDialog ("Select Word File");

app.open (myIndFile);

var mydoc = app.activeDocument;

mydoc.textPreferences.smartTextReflow = true;
mydoc.textPreferences.limitToMasterTextFrames = false;
mydoc.textPreferences.deleteEmptyPages = false;
mydoc.textPreferences.addPages = AddPageOptions.endOfStory;

mydoc.pages.item(0).textFrames.item(0).place(File(myWordFile));

app.activeDocument.save(new File(myIndFile + "_Flowed"));


app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;//This coding is not skipping of dialog boxes etc.

 

Regards,

Vetha


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>