Just embed the code at the document-level. Or better yet, simply set the Initial View setting (under File - Properties) to show the Bookmarks panel.
Thanks for your answer.
Can you give a little snippet for what you mean of embedding the code in the document level?
Do you mean including the script in the document so it will run when the document is opened?
If that's the case then the 'opener' will need to have his js set to run which is not necessarily so.
Need to do this with JS and not the UI so unless I misunderstood your second options not god for me.
I can explain, but why do you want to do it using JS instead of the built-in option?
Because I want to automate it.
The basic Idea is to automate exporting a document from InDesign into a PDF and sending it as an email.
This can be achieved by running the jsx script from InDesign and have the jsx script use vsb or applescript to communicate with the other applications, like outlook and acrobat. Acrobat and outlook (not really needed as one can send strait from acrobat) would ideally do their stuff with hidden windows and no user interaction. The requirement is that the bookmarks panel should be defaulted to open.
In summary press some script shortcut key from InDesign and the boss / client has the PDF document in the way he wants it.
1 person found this helpful
You should check the settings of ID if it's not possible to set the Initial View there... If not, you can execute this code:
this.addScript("load", "this.pane = 'Bookmark';");
I'm not sure what I'm supposed to see there... I gave you the code to use to achieve what you wanted.
Is there a way of saving this setting without physically doing it the "built-in way"?
This is a good start but it is a problem that the js has be set to enabled on the openers end.
' NotAllowedError: Security settings prevent access to this property or method.
I can probably get around that by saving the doc with 'pure vbs'
I would be happy to hear if there's any more solid way avoiding the script embedding and the changing the security settings.
Can one change the security settings to avoid the saveAs problem?
To see it work you have to close Acrobat and reopen it (I think) the debugger should be closed
My not fully working vbs is
I'm going out now so I won't give any quick response.