close document after save api

hello everyone!

i am in the process of writing a macro to retrieve stock sizes for non weldment parts.  i have everything working pretty well so far but i am running into 1 little thing.  after it retrieves the stock sizes and creates a custom property for the active part i want to save the part then close it.  can someone help me out with what the code is to save then close a document?

thanks in advance.

SolidworksApi macros