You should be saving the document on the line immediately proceeding the line to close it. Here's a sample of a macro I use that combines the save and close command for me:
swModel.Save3 swSaveAsOptions_e.swSaveAsOptions_Silent, swerror, swwarnings
See the attached macro for its use.
Save&Close.swp.zip 11.0 KB