Skip to main content
Inspiring
December 13, 2018
Answered

setting the active doc and adding page numbers

  • December 13, 2018
  • 1 reply
  • 398 views

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 has been closed for replies.
Correct answer try67

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
December 13, 2018

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.