app.addToolButton() no longer works in second open document (Acrobat DC 15.01620041)
Maybe I am doing something wrong, but here is my code that is put in a document-level JavaScript:
function MakeButtons() {
app.addToolButton({
cName : "ResetButton",
cExec : "ResetAll()",
cTooltext : "Reset the entire sheet and all form fields to their initial value.",
nPos : 1,
cLabel : "Reset"
});
app.addToolButton({
cName : "ImportExportButton",
cExec : "ImportExport_Button()",
cTooltext : "Import or Export form data with the .fdf or .xfdfd file extension.\n\nYou can select to only export the data that is not auto-filled by the sheet.\n\nThis menu also offers the option to add your own code to the sheet. For more information on this, see the FAQ.",
nPos : 2,
cLabel : "Im\/Export"
});
}
MakeButtons();
I have several document with this exact code. When I open one of these documents, I get a "JavaScript-Window" with both these buttons. However, when I open a second document, I get no such window. Even when I close all the documents, but leave Acrobat running, and open a document again, I don't get this "JavaScript-Window".
Running the "MakeButtons()" function from console also has no effect.
This behaviour is new for Acrobat DC, because in Acrobat XI every opened document would have their buttons shown without a problem. Even in earlier versions of Acrobat DC (I am now running 15.01620041 on Windows) this was not an issue (although I don't know what version it was still working).
Does anybody know of a way to change the code to make this working again? Or is it something I should take up with the Adobe support staff?
