How to use app.openInPlace?

I have tried adding app.openInPlace to my JS function,
however nothing changed the pdf continues to open in new window.

Can you tell me how to apply app.openInPlace to the following function?

function openWindow(){app.openDoc("book.pdf", this);}




Michael Boyce


1 Answer

First, you have to be aware that you change the user's preferences with openInPlace. You will have to take precautions if you do not want to make the changes permanent (by saving the current state, and restoring it when done). The example below does do that.

function openWindow() {
var oip = app.openInPlace ;
app.openInPlace = false ;
app.openDoc("book.pdf", this) ;
app.openInPlace = oip ;
}

And that should do it.

Hope this can help.

Max Wyss.


Max Wyss   


Please specify a reason: