This script used to work. But not anymore. Please help.
doc=activeDocument.selection;
for (i=0; i<doc.length; i++){
if(obj.kind == "TextType.PATHTEXT"){
suurus = doc.textRange.characterAttributes.size;
font = doc.textRange.characterAttributes.textFont;
style = doc.textRange.characterAttributes.textFont.name;
color = doc.textRange.characterAttributes.fillColor;
just = obj.textRange.justification;
x=doc.anchor[0];
y=doc.anchor[1];
myText = activeDocument.textFrames.pointText(Array(x,y));
myText.contents = doc.contents;
myText.textRange.characterAttributes.size = suurus;
myText.textRange.characterAttributes.textFont = font;
myText.textRange.characterAttributes.textFont.name = style;
myText.textRange.characterAttributes.fillColor = color;
myText.textRange.justification = just;
doc.remove();
}
}