InDesign script to save and close all opened documents.
INSTALL INSTRUCTIONS: Unzip the JSX file to InDesign Scripts Panel folder (menu Window > Utilities > Scripts, then right click on "user" folder and choose to reveal in Explorer/Finder. Open the "Scripts Panel" folder). Saving the JSX file in this folder, it'll automatically be shown in Scripts panel inside InDesign software.
HOW TO RUN: To run this script you must have at least one document open in InDesign. With your document opened, go to Scripts panel (menu Window > Utilities > Scripts) and expand the "user" folder. To run the script, click twice on script filename. Running the script all opened documents will be saved and closed (if the document is not saved yet, you'll be asked to save it).