Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Smart Text Reflow not working

Participant ,
Sep 18, 2014 Sep 18, 2014

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

TOPICS
Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guru , Sep 22, 2014 Sep 22, 2014

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

...
Translate
Enthusiast ,
Sep 19, 2014 Sep 19, 2014

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.


page.png

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 19, 2014 Sep 19, 2014

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Sep 22, 2014 Sep 22, 2014

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;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 27, 2014 Oct 27, 2014
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines