Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Apply Object Style for Anchor

$
0
0

Hi All,

 

Could anyone please give solution for my request.

 

1. Find Anchor marker

2. Apply object style for that selecting parent Graphics frame.

 

var myDoc = app.activeDocument;

 

app.findGrepPreferences = app.changeGrepPreferences = null;

 

app.findGrepPreferences.appliedParagraphStyle = "abc"

 

app.findGrepPreferences.findWhat = "~a"

 

var myFound = myDoc.findGrep();

 

for(i=0; i<myFound.length; i++)

{

    myFound[i].parentTextFrames[0].appliedObjectStyle = app.activeDocument.objectStyles.item("Image")   //Error this only

    }

 

Thanks in advance

Beginner


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>