Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 94346

Re: Re: written with a specific paragraph style Can I transfer data

$
0
0

Try this,

 

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 + "\r"
}
app.findGrepPreferences = app.changeGrepPreferences = null; 

 

 

Vandy


Viewing all articles
Browse latest Browse all 94346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>