Copy link to clipboard
Copied
Hi !!!
Is it possible change a selected paragraph with any paragraph style by script?
Example:
My paragraph style is:
Font: Garamond, size 7pt, color: black, align justfy (or any selected paragraph style)
Script to set the selected paragraph with paragraph style describe above to:
Font: Humanist, sise 8pt, color: black, align justfy
Drop caps: number of lines: 3, one or more caracteres: 2
Thanks for your script, Foxy Ford!
Try this
var myPara = app.selection[0].paragraphs[0];
var myChar = myPara.characters[0];
myPara.dropCapCharacters = 1;
myPara.dropCapLines = 2;
myPara.dropcapDetail = 1;
myPara.firstLineIndent = 0;
myPara.dropCapStyle = "My Style"
// My Syle must be created into Character Style, of course.
Copy link to clipboard
Copied
Of course you can.
In paragraph it's possible to set every property, check the reference guide.
If you prefer you can set the appliedParagraphfstyle.
In this way you can apply an existing paragraph style and set all the properties you want in one shot.
Copy link to clipboard
Copied
This is my problem.
I´m looking for this set property, but I dont find anything about it.
Can you help me?
Thanks anyway!
Copy link to clipboard
Copied
I got it.
But there is a trouble.
How can I change into this script the first caracter dropcaps to fill tint 30% Black?
var myPara = app.selection[0].paragraphs[0];
var myChar = myPara.characters[0];
myPara.dropCapCharacters = 1;
myPara.dropCapLines = 2;
myPara.dropcapDetail = 1;
myPara.firstLineIndent = 0;
Copy link to clipboard
Copied
Set myPara.dropCapStyle to a character style that specifies your tint.
Copy link to clipboard
Copied
Thanks for your script, Foxy Ford!
Try this
var myPara = app.selection[0].paragraphs[0];
var myChar = myPara.characters[0];
myPara.dropCapCharacters = 1;
myPara.dropCapLines = 2;
myPara.dropcapDetail = 1;
myPara.firstLineIndent = 0;
myPara.dropCapStyle = "My Style"
// My Syle must be created into Character Style, of course.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more