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

How to place multi page Word document

Explorer ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

Hi,

We can use Shift + Click to insert multi-page Word document into InDesign.

How can I do it using CEP extension/script? Right now, using place only 1st page of Word Document is getting inserted.

TOPICS
How to , Import and export , Scripting

Views

5.1K

Translate

Translate

Report

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
Community Expert ,
Jun 26, 2020 Jun 26, 2020

Copy link to clipboard

Copied

Hi,

you could trust an automation mechanism that can be turned on or off with InDesign's preferences to add pages and thread the needed text frames: Preferences > Type > Smart Text Reflow or you could add pages and thread text frames until all the contents is visible on the pages.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate

Report

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
Explorer ,
Jun 30, 2020 Jun 30, 2020

Copy link to clipboard

Copied

Please let me know if that can be done using CEP extension i.e. JavaScript/ExtendScript because I am bit new to InDesing and unable to find Smart Text Reflow option in CEP tutorial.

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 30, 2020 Jun 30, 2020

Copy link to clipboard

Copied

Hm. You have to study the vast ExtendScript DOM documentation of InDesign compiled by Gregor Fellenz:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

 

Let's assume you know that Smart Text Reflow could be a property of the app or an individual document.

Further, in the UI it obviously has to do with preferences and text. Because I already dealt with it I knew that there are textPreferences. So I searched for textPreferences in the documentation and found this:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#TextPreference.html

 

Here all the properties you need ( and also a lot you do not need ) are listed.

app.documents[0].textPreferences.smartTextReflow = true ;

That would basically turned it on or off. But look also into other properties that come along with it:

 

preserveFacingPageSpreads

limitToMasterTextFrames

 

etc.pp.

 

Regards,

Uwe Laubender

( ACP )

 

Votes

Translate

Translate

Report

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
Explorer ,
Jul 02, 2020 Jul 02, 2020

Copy link to clipboard

Copied

Thanks a lot for your reply. 

But I am facing one issue that:

If I open new document with Primary Text Frame enabled manually without script then Smart Text Reflow works,

But if I create a new document using app.documents.add() then  Smart Text Reflow is not working. I am using following options. Please check what I might be missing?

app.activeDocument.documentPreferences.createPrimaryTextFrame = true;
app.activeDocument.textPreferences.smartTextReflow = true;

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

Hi @SVIDdev, I know this is an old post, but I was looking for something similar and I found some great info in another answer by @Laubender. Maybe it would help you. I've added in the smartTextReflow bits and other things.

- Mark

var myDoc = app.documents.add(
    {
        documentPreferences:
        {
            intent: DocumentIntentOptions.PRINT_INTENT,
            facingPages: false,
            createPrimaryTextFrame: true,
            pageOrientation: PageOrientation.PORTRAIT,
            pagesPerDocument: 1,
            startPageNumber: 1,
            pageHeight: "210mm",
            pageWidth: "297mm"
        },
        textPreferences:
        {
            limitToMasterTextFrames: true,
            linkTextFilesWhenImporting: false,
            smartTextReflow: true
        },
        viewPreferences:
        {
            rulerOrigin: RulerOrigin.SPREAD_ORIGIN,
            showRulers: false,
            horizontalMeasurementUnits: MeasurementUnits.MILLIMETERS,
            verticalMeasurementUnits: MeasurementUnits.MILLIMETERS
        }
    }
);

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 12, 2022 Jun 12, 2022

Copy link to clipboard

Copied

Hi SVIDev and Mark,

maybe the best bet is to turn off smartTextReflow and to add pages and threaded text frames until a given placed text or Word doc is flowing in entirely.

 

You may also discover, that there is a permanent overflow of text that often can happen when images are placed with a Word document and the anchored image's height exceeds the frame height of the recieving text frame. Very likely in some cases, because InDesign's import for Word will not handle the crop of an image properly that you have done in Word.

 

How to handle this particular issue is a different discussion…

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

LATEST

Thanks @Laubender, in my case the smart text reflow suits me, but I'm bringing in Excel file, not Word, and in a fairly controlled environment. However, your warning is good to know—I think I may have come across that problem years ago. Can't remember how—or if—I solved it.

- Mark

Votes

Translate

Translate

Report

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