- app.findGrepPreferences = app.changeGrepPreferences = null;
- app.findGrepPreferences.findWhat = ".+";
- app.findGrepPreferences.appliedParagraphStyle = "test"; //mention your paragraph style name
- var mySearch = app.activeDocument.findGrep();
- myFrame = myDoc.textFrames.add ({geometricBounds:[".5in",".5in","5.5in","5.5in"]});//textframe will created in the first page of your InDesign document
- myFrame.insertionPoints[-1].contents = "CONTENTS\r";
- for(i=0; i<mySearch.length; i++)
- {
- var mySearchContent = mySearch[i].contents;
- mySearchContent = mySearchContent.replace(/(\d+)(\t.+?\t)(.+?)(\t\d+)/g, '$1-$3');
- myFrame.insertionPoints[-1].contents = mySearchContent + "~f" // THİS ERROR 1-A~f2-A~f3-A....
- }
- app.findGrepPreferences = app.changeGrepPreferences = null;
↧
Re: written with a specific paragraph style Can I transfer data
↧