InDesign CC自動化作戦 (InDesign CC Automation Operation)

テキストフレームの背景色を指定する

■プログラム説明(ソースコード説明)
 テキストフレームの背景色はfillColorで設定できます。

■ソースコード
pageObj = app.activeDocument;
setColor = [0, 100, 100, 0];
Color1 = pageObj.colors.add({model:ColorModel.process,space:ColorSpace.cmyk,colorValue:setColor});
txtObj = app.activeDocument.selection;
for (i=0; i<txtObj.length; i++)
{
txtObj[i].fillColor = Color1;
}


■使い方
1:テキストフレームを選択します。
2:スクリプトを実行します。
3:テキストフレームの背景色が赤色になります。


■ポイント
 なし

■実際のスクリプトをダウンロード(sample.jsx.zip)

写真素材 PIXTA