Everything that can be done to align an anchored frame using Frame's user interface can also be done via ExtendScript.
Open the ExtendScript ToolKit and take a look at the AFrame class in the Object Model Viewer. You will see the Properties and Methods that are available. It's getting late here but I may be able to write a small example script tomorrow.
Setting the positioning of an anchored frame is one of the easier procedures with ExtendScript, but there are limitations...
Assign the anchored frame to a variable named anchoredFrame, I won't go into the method of selection here.
To select the Anchoring Position use the following:
anchoredFrame.AnchorType = Constants.FV_ANCHOR_INLINE;
The other possible anchoring poitions are:
Now that the anchoring position has been set, you can adjust the relevant positions just as you would with the user interface. The relevant properties are:
These two properties look useful, but they seem to be read only for anchored frames:
So, if you want to have more control over the horizontal positioning with the anchoring position set to Below Current Line (Constants.FV_ANCHOR_BELOW) you are probably out of luck - it can't be done using the user interface. In this case the best way would perhaps be to adjust the Anchored frame to match the column width then shift its entire contents to the required position. Perhaps someone knows a better way?
Thanks so much, Ian.
Wow, Ian, that was fast. I’ll give it a try.