Hi,
I tried to create a Paragraph style using the script. I used the following:
var myDoc = app.activeDocument;
var myTitleStyle = “eb-Title” // Title
var mySubTitleStyle = “eb-SubTitle” // SubTitle
var myParaText = “eb-ParaText”
var myReference = “eb-Reference”
var myFont = “LathaRegular”
try{
var pstyle = myDoc.paragraphStyles.add(mySubTitleStyle);
with(pstyle) //Change the below lines as per your requirement
{
Name =mySubTitleStyle;
appliedFont = myFont;
pointSize = 13;
leading=”18p”;
tracking = 100;
justification=Justification.LEFT_ALIGN;
spaceAfter=”0p6″;
spaceBefore=”0p4″;
underline=true;
}
}
catch(e)
{
alert(“‘” + mySubTitleStyle + “‘” + “already exists in the document.”)
}
But, it errors out saying that “Object does not support the property or method paragraphstyles”. Any clues?
Thanks in advance.