Hi,
In case of placing a group your code is trying to move some text - without container - into the group ==> so it fails
Try to modify the code including additional variable mRef as a move reference parameter, so:
...
var mRef = myPlaceAsset;if (mRef.textFrames.length >0) mRef = mRef.textFrames[0];
myAnno.move(LocationOptions.AT_END, mRef);
...
Jarek