Hw could copy a unformatted text from a formated paragraph
Dear all,
I am trying to copy an unformatted text from a formatted paragraph i have a code snippet, Please check it out and tell me that how can i copy a unformatted text from a paragraph. Result of this script should be a unformatted selected text...
var par = app.selection[0].paragraphs[0];
if (app.selection[0] instanceof InsertionPoint)
{
if (par.characters[-1].contents != "\r")
par.insertionPoints[-1].contents = "\r";
par.characters.itemByRange(app.selection[0], par.insertionPoints[-1]).select();
app.copy();
}
else
{
par.characters.itemByRange(app.selection[0], par.insertionPoints[-1]).select();
app.copy();
}