Hi ,
I am trying this below code.First split all pages in framemaker document . And first time click the button to highlight top view using zoom condition within textframe ,and second time click the button to display the bottom view with zoom condition within textframe ,and same as all the pages in framemaker document.This is my task.Now i had complete, till split the pages in framemaker document.I need to display top view and bottom view using zoom within textframe.So please suggests if any ideas.
var oDoc = app.ActiveDoc;
var textFrame;
var tempValue = 0;
var buttonWindow = new Window ("palette", "Textframe");
var b= buttonWindow.add ("button", undefined, {style: "toolbutton"});
b.text = "Add textframe";
b.onClick = function (){
tempValue = tempValue + 1;
AddTextFrame(oDoc, tempValue);
}
buttonWindow.show();
function AddTextFrame(oDoc, tempValue) {
firstRef = oDoc.FirstBodyPageInDoc;
var count = 0;
while (firstRef.ObjectValid()) {
if (count != 0) {
textFrame = oDoc.NewTextFrame (firstRef.PageFrame);
textFrame.Width = oDoc.PageWidth;
textFrame.Height = oDoc.PageHeight/2;
var topPage=textFrame.Height;
// textFrame.Delete();
oDoc.Zoom=1.2*65536;
var textFrame1 = oDoc.NewTextFrame (firstRef.PageFrame);
textFrame1.Width = oDoc.PageWidth;
textFrame1.Height = oDoc.PageHeight/2;
textFrame1.LocY =(oDoc.PageHeight) - (textFrame1.Height);
oDoc.Zoom=1.2*65536;
var bottomPage= textFrame1.LocY;
}
firstRef = firstRef.PageNext;
oDoc.CurrentPage = firstRef;
}
count++;
if (count == tempValue) {
break;
}
}