This content has been marked as final.
Show 2 replies
-
1. Re: How to Referance Paragraph Style Groups in Code?
secondgradersrule Aug 15, 2011 11:15 AM (in response to RichardM0701)Richard:
I construct a lot of Indesign Tagged Text files, and this is an example of what I stick at the beginning of the line when the style sits in a group. The style name is "AGBoldCtr" and it sits in group "xSports."
<pstyle:xSports\:AGBoldCtr>American League
In code, I create a variable for a style in a group like this:
var PPHead = app.activeDocument.paragraphStyleGroups.item("xSports").paragraphStyles.item("AGPPHead");
Then I assign variable PPHead to a paragraph as in:
app.activeDocument.selection[0].paragraphs[iLoop].appliedParagraphStyle= PPHead; //
Dick Conrad
-
2. Re: How to Referance Paragraph Style Groups in Code?
RichardM0701 Aug 15, 2011 12:36 PM (in response to secondgradersrule)Thank you Mr. Conrad,
The code ended up like this and works perfect thanks to the code you supplied:
myStyle = app.activeDocument.paragraphStyleGroups.item("Headings").paragraphStyles.item("Heading 1"); myStyle.appliedFont = "Microsoft JhengHei";thanks again!
Rich


