Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to open or close all documents in a book at once?

Advisor ,
Mar 04, 2025 Mar 04, 2025

I found the shortcut for storing all documents in a book (set under View Navigation):
Ctrl+Shift+Alt+S

(This may not be very scientific, as it is possible to save the documents that  outside the book)
But did not find a command to open or close all documents in the book at once.

pper right corner, right click doesn't have this function at all.

TOPICS
Bug , Feature request , How to , Import and export , Scripting , Type
127
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Explorer , Mar 04, 2025 Mar 04, 2025

There is a way to open multiple documents via the book panel, but it's a bit iffy.

Select the first document in your book panel, then hold Shift and click on the last document, this way all documents should be selected. Now double click (without holding Shift) on any of the selected documents and all should open. At least this works on MacOS.

Closing all documents can be done by Command + Option + W on Mac, this is a system wide shortcut to close all windows of the active program. I don't know if

...
Translate
Community Expert , Mar 04, 2025 Mar 04, 2025

Open all book documents: Select desired files listed in bookfile; double-click on any of the selected files.

Save all open documents: Cntl-Alt-Shift-S/Cmd-Opt-Shift-S.

Close all open documents:  Cntl-Alt-Shift-W/Cmd-Opt-Shift-W. (I recommend saving all first or your will have to respond to each unsaved document.)

 

Translate
Explorer ,
Mar 04, 2025 Mar 04, 2025

There is a way to open multiple documents via the book panel, but it's a bit iffy.

Select the first document in your book panel, then hold Shift and click on the last document, this way all documents should be selected. Now double click (without holding Shift) on any of the selected documents and all should open. At least this works on MacOS.

Closing all documents can be done by Command + Option + W on Mac, this is a system wide shortcut to close all windows of the active program. I don't know if there's a windows equivalent for that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 04, 2025 Mar 04, 2025

Closing a document after selecting all will also prompt to close all documents.
Thank you very much.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2025 Mar 04, 2025

Assuming your book is active, this will close them. Can be reversed engineered to open them too.  

 

try {
 var b = app.activeBook;
} catch(e) { exit(); }
 var bcs = b.bookContents;
var i = bcs.length;
while(i--) {
   try { bcs[i].close(SaveOptions.YES); } catch(e) {}
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 04, 2025 Mar 04, 2025

This one didn't respond.
I don't know what went wrong.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2025 Mar 04, 2025
LATEST

Open all book documents: Select desired files listed in bookfile; double-click on any of the selected files.

Save all open documents: Cntl-Alt-Shift-S/Cmd-Opt-Shift-S.

Close all open documents:  Cntl-Alt-Shift-W/Cmd-Opt-Shift-W. (I recommend saving all first or your will have to respond to each unsaved document.)

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines