Copy link to clipboard
Copied
Hi,
When I flow doc file to indesign smart text reflow not working properly. Please see my below codings.
-----------------------
var myIndFile = File.openDialog ("Select Indesign File");
var myWordFile = File.openDialog ("Select Word File");
var myWordFileName = myWordFile.name;
var myIndFilePath = myIndFile.filePath;
app.open (myIndFile);
var mydoc = app.activeDocument;
mydoc.pages.item(0).textFrames.item(0).place(File(myWordFile));
mydoc.textPreferences.smartTextReflow = true;
mydoc.textPreferences.limitToMasterTextFrames = true;
mydoc.textPreferences.deleteEmptyPages = true;
//~ mydoc.textPreferences.addPagesTo = AddPageOptions.END_OF_STORY();
//~ app.activeDocument.save(File("myIndFilePath" + "/" + "myWordFileName"));
Regards,
Vetha
This is the sort of thing you could do.
...//https://forums.adobe.com/thread/1579131
var myWordFile = File.openDialog ("Select Word File");
!myWordFile && exit();
var doc = app.activeDocument,
placePage = doc.pages[0],
placeFrame = placePage.textFrames[0],
newPage, newFrame, pageProperties, frameProperties;
placeFrame.place(File(myWordFile));
if (placeFrame.overflows) {
pageProperties = placePage.properties;
frameProperties = placeFrame.properties;
newPage = doc.pages.add(p
Copy link to clipboard
Copied
Hi,
Smart text reflow need at least two text frames are threaded together, make sure the first page textframe is linked to the second page textframe (see below image for reference), then run the below script and wait for 1 or two seconds, then it will work.
var myIndFile = File.openDialog ("Select Indesign File");
var myWordFile = File.openDialog ("Select Word File");
var myWordFileName = myWordFile.name;
var myIndFilePath = myIndFile.filePath;
app.open (myIndFile);
var mydoc = app.activeDocument;
mydoc.pages.item(0).textFrames.item(0).place(File(myWordFile));
mydoc.textPreferences.smartTextReflow = true;
mydoc.textPreferences.limitToMasterTextFrames = false;
mydoc.textPreferences.deleteEmptyPages = true;
Vandy
Copy link to clipboard
Copied
Hi Vandy,
I have already tried, it will work. but I expect how to run in a single page. OK anyway thanks for your reply
Thank you so much.
Regards,
Vetha
Copy link to clipboard
Copied
This is the sort of thing you could do.
//https://forums.adobe.com/thread/1579131
var myWordFile = File.openDialog ("Select Word File");
!myWordFile && exit();
var doc = app.activeDocument,
placePage = doc.pages[0],
placeFrame = placePage.textFrames[0],
newPage, newFrame, pageProperties, frameProperties;
placeFrame.place(File(myWordFile));
if (placeFrame.overflows) {
pageProperties = placePage.properties;
frameProperties = placeFrame.properties;
newPage = doc.pages.add(pageProperties);
newFrame = newPage.textFrames.add(frameProperties);
placeFrame.nextTextFrame = null;
newFrame.previousTextFrame = placeFrame;
}
doc.textPreferences.smartTextReflow = true;
doc.textPreferences.limitToMasterTextFrames = false;
doc.textPreferences.deleteEmptyPages = true;
Copy link to clipboard
Copied
Hi Trevor,
Excellent Answer, Sorry for delay reply, because at the time of I ask questions to you and others, I don't know how to use forum. Anyway Thanks a lot.
Fine to work your script.
Regards,
Vetha
Find more inspiration, events, and resources on the new Adobe Community
Explore Now