Skip to main content
December 10, 2013
Answered

How do I take an anchored frame and return the paragraph tag it uses?

  • December 10, 2013
  • 2 replies
  • 871 views

I need to parse through anchored frames and return the paragraph tag that it is located it. I can't seem to find a property that returns the paragraph tag. Anyone have any ideas?

This topic has been closed for replies.
Correct answer frameexpert

Try this on the selected anchored frame:

#target framemaker

var doc = app.ActiveDoc;

var aFrame = doc.FirstSelectedGraphicInDoc;

var pgf = aFrame.TextLoc.obj;

alert (pgf.Name);

Rick

2 replies

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
December 10, 2013

Try this on the selected anchored frame:

#target framemaker

var doc = app.ActiveDoc;

var aFrame = doc.FirstSelectedGraphicInDoc;

var pgf = aFrame.TextLoc.obj;

alert (pgf.Name);

Rick

www.frameexpert.com
December 10, 2013

Thanks!

frameexpert
Community Expert
Community Expert
December 10, 2013

Please mark my answer as Correct. Thanks.

www.frameexpert.com
4everJang
Legend
December 10, 2013

The AFrame object has a TextLoc property which leads to the paragraph in which the anchor is located. Does that answer your question?