This might help given that you set the margins of the main thread and also set a specific object style (I like to report everything as possible on native and editable features) ;)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var main = function() {
var doc = app.properties.activeDocument, sel, docFile, m = $.os[0]==”M”,
mf = function ( f ) {return (f instanceof Folder)||/\.docx?$/i.test(f.name)},
wf = “Word files : *.doc, *.docx;”, filter = m? mf : wf;
if ( !doc ) {
alert(“You need an open document” );
return;
}
if ( app.selection.length!=1 || !(app.selection[0] instanceof InsertionPoint) ) {
alert(“Please select some insertionPoint and try again”);
return;
}
docFile = File.openDialog(“Please open Word file…”, filter);
if ( !docFile ) return;
sel = app.selection[0];
sel.place ( docFile );
anchorAnswers ( doc );
}
function anchorAnswers ( doc ) {
var fgp = app.findGrepPreferences.properties,
cgp = app.changeGrepPreferences.properties,
n = 0, found = [], nText, ip, anchored;
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.properties = {
findWhat:”#L.+r”,
}
found = doc.findGrep();
n = found.length;
while ( n– ) {
nText = found[n];
ip = nText.insertionPoints[0];
anchored = ip.textFrames.add({geometricBounds:[0,0,60,60]});
nText.move ( LocationOptions.AT_BEGINNING, anchored.parentStory.insertionPoints[0] );
anchored.appliedObjectStyle = getObjectStyle (doc, “anchored” );
}
app.findGrepPreferences.properties = fgp;
app.changeGrepPreferences.properties = cgp;
}
function getObjectStyle (doc, styleName ) {
var st = doc.objectStyles.itemByName ( styleName );
!st.isValid && st = doc.objectStyles.add ({name:styleName});
return st;
}
var u;
app.doScript ( “main()”,u,u,UndoModes.ENTIRE_SCRIPT, “The Script” );
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////