Object.prototype.isText = function() {
switch(this.constructor.name){
case "InsertionPoint":
case "Character":
case "Word":
case "TextStyleRange":
case "Line":
case "Paragraph":
case "TextColumn":
case "Text":
case "TextFrame":
return true;
default :
return false;
}
}
myStyles = doc.paragraphStyles;
try {
for (i = (myStyles.length -1); i > 0; i--) {
myStyles[i].remove();
}
} catch (e) {}
myStyles = doc.paragraphStyles;
for (i = (myStyles.length -1); i > 1; i--) {
myStyles[i].remove();
}
if (app.version != 3) {
app.select(theStory.paragraphs[n].insertionPoints[-2],SelectionOptions.replaceWith);
} else {
app.select(theStory.paragraphs[n].insertionPoints[-2],SelectionOptions.replace);
}
if (app.selection.length >= 0) {
var mySel = app.selection;
app.select(null);
}
app.layoutWindows[0].zoom(ZoomOptions.fitPage);
app.layoutWindows[0].zoomPercentage = 191;
try {
app.select(mySel);
} catch (e) {};
if (app.selection.length >= 0) {
var mySel = app.selection;
app.select(null);
}
app.layoutWindows[0].zoom(ZoomOptions.fitPage);
app.layoutWindows[0].zoomPercentage = 191;
try {
app.selection = makeArray(mySel);
} catch (e) {};
function makeArray(theSel) {
var myArray = new Array();
var theLim = theSel.length;
for (j=0; theLim>j; j++) {
myArray.push(theSel[j]);
}
return myArray
}
North America
Europe, Middle East and Africa
Asia Pacific