Moving through a document's pages is a straight-forward process. The first page, whether a body, master or reference, is a document property:
Once you locate the page of interest, you can make it the current page. The following script makes the first reference page the active page.
var doc, firstRef;
doc = app.ActiveDoc;
firstRef = doc.FirstRefPageInDoc;
doc.CurrentPage = firstRef;
If you run this script on the Portrait template, the following page will appear on screen:
- FirstBodyPageInDoc
- FirstMasterPageInDoc
- FirstRefPageInDoc
- LastBodyPageInDoc
- LastMasterPageInDoc
- LastRefPageInDoc
Once you locate the page of interest, you can make it the current page. The following script makes the first reference page the active page.
var doc, firstRef;
doc = app.ActiveDoc;
firstRef = doc.FirstRefPageInDoc;
doc.CurrentPage = firstRef;
If you run this script on the Portrait template, the following page will appear on screen:
No comments:
Post a Comment