This content has been marked as final.
Show 2 replies
-
1. Re: Script for selecting consecutive paragraphs -- can anyone help me?
pkahrel Jun 5, 2010 6:52 AM (in response to Maria964)This is a bit crude but you get the picture:
var style_name = "cabecalho"
var doc = app.documents[0];
var first_pstyle = doc.paragraphStyles.item(style_name);
var story = app.selection[0].parentStory;
var cur_sel = app.selection[0].paragraphs[0];
cur_sel.appliedParagraphStyle = first_pstyle;
var nextpar = story.paragraphs.nextItem (cur_sel);
nextpar.appliedParagraphStyle = cur_sel.appliedParagraphStyle.nextStyle;
cur_sel = nextpar;
var nextpar = story.paragraphs.nextItem (cur_sel);
nextpar.appliedParagraphStyle = cur_sel.appliedParagraphStyle.nextStyle;Peter
-
2. Re: Script for selecting consecutive paragraphs -- can anyone help me?
Maria964 Jun 5, 2010 7:00 AM (in response to pkahrel)THANK YOU, Peter!
You are going to save me a lot of stupid work during the next week. Your script works very well.
If you ever come to Madrid i promise that i will pay you a dinner.
Thank you again.


