Skip to main content
Inspiring
Dec 13, 2018 3:11 PM UTC
Answered

setting the active doc and adding page numbers

var openDoc = app.openDoc({cPath: myPath});

var d = app.activeDocs; <--gets all open docs

app.alert("this.path: " + this.path);  <--this.path is not always the openDoc. 

app.alert("openDoc.path: " + openDoc.path);

How do I make the openDoc the active Doc?  Essentially I am needing to add page numbers to it.

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Dec 13, 2018 3:13 PM UTC

You can try using the bringToFront method, but there's really no need to do it. Just use the openDoc variable instead of the "this" variable.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Dec 13, 2018 3:13 PM UTC

You can try using the bringToFront method, but there's really no need to do it. Just use the openDoc variable instead of the "this" variable.

Translate