Save modified document

Hi all,

Attached image show what i want to have which the showing and the hiding of the save modified documents pragmatically via API as if the I check or uncheck the specified checkbox

Thanks

SolidworksApi macros