• 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 select or copy all text in InDesign document

New Here ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

I want to select all text content of every page in an InDesign document or copying all text in InDesign document. I have tried scripting method, but did not work.

TOPICS
Scripting

Views

1.2K

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 ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

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 ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

In addition to Derek's suggestion you might want to look at https://redokun.com/blog/indesign-to-word to see how to use a pdf exported from InDesign to Acrobat and then from there directly to a Word Document.

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
Advisor ,
Dec 31, 2020 Dec 31, 2020

Copy link to clipboard

Copied

LATEST

Hello Karky5EA7,

 

The below script will write all the text from a InDesign document to a single .txt file, saving the .txt file to the same location as the Indesign document.

 

 

doc = app.documents[0];

var fileName = doc.name.replace(/.indd$/i, "");

var path = doc.filePath;

var myTextFilename = fileName + '_TEXT.txt';

allStorys = [];
var allStoriesArray = app.documents[0].stories.everyItem().getElements();
for(var n=0; n<allStoriesArray.length; n++){
allStorys.push(allStoriesArray[n].contents);
}

var myText = allStorys;

var file = new File(path +'/' + myTextFilename);

file.encoding = 'UTF-8';
file.open('w');
file.write(myText);
file.close();
alert('Done writing the text!')

 

 

 

Regards,

Mike

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