Grep検索置換
app.changeGrepPreferences = NothingEnum.nothing; app.findGrepPreferences = NothingEnum.nothing; app.findGrepPreferences.findWhat = "<太字>([^<]*)</太字>"; app.changeGrepPreferences.changeTo = "$1"; app.changeGrepPreferences.appliedFont = app.fonts.item("小塚ゴシック Pro B"); app.changeGrepPreferences.pointSize = "7pt"; app.changeGrepPreferences.leading = "10pt"; app.changeGrep(); //ドキュメント対象
[VBScript]
Set app = CreateObject("InDesign.Application") Const idNothing = 1851876449 app.FindGrepPreferences = idNothing app.ChangeGrepPreferences = idNothing app.findGrepPreferences.findWhat = "<太字>([^<]*)</太字>" app.changeGrepPreferences.changeTo = "$1" app.changeGrepPreferences.appliedFont = app.fonts.item("小塚ゴシック Pro B") app.changeGrepPreferences.pointSize = "7pt" app.changeGrepPreferences.leading = "10pt" app.changeGrep() 'ドキュメント対象
置換対象
app.changeGrep(); //ドキュメント対象 frame.parentStory.changeGrep(); //選択中のフレーム対象
※参考(一部)
app.changeGrepPreferences.horizontalScale = 70; //長体
app.changeGrepPreferences.verticalScale = 90; //平体
app.findChangeGrepOptions.kanaSensitive = false; //カナを区別
app.findChangeGrepOptions.widthSensitive = true; //半角全角を区別
app.changeGrepPreferences.leftIndent = "0pt"; //インデント