Move answer text to answer layer
Hi
I want to create textframe for answer text in question layer and then move the textframe to anno layer, but keep the anchor in question layer.
I have created the textframe, but when i move the textframe to anno layer i am getting the below error.

Here is the code
var myDoc = app.activeDocument;
app.findGrepPreferences = null;
app.findGrepPreferences.appliedCharacterStyle = myDoc.characterStyles.item("Anno");
var AnnoList = myDoc.findGrep();
for (i=0; i<AnnoList.length; i++)
{
TextFr = AnnoList.textFrames.add({anchoredObjectSettings:{anchoredPosition:AnchorPosition.INLINE_POSITION, anchorXoffset:"1mm"}});
TextFr.geometricBounds = ["0mm", "0mm","5mm", "30mm" ];
AnnoList.move(LocationOptions.AT_BEGINNING, TextFr.texts[0]);
TextFr.fit (FitOptions.FRAME_TO_CONTENT);
L = app.activeDocument.layers.item ('AnnoLayer');
TextFr.itemLayer = L;
}
Regards,
Sangeetha
