Rebuild Drawing Using Windows Form Application

I'm creating a Windows Form Application that will open all SolidWorks Drawings from a selected folder and rebuilds all drawings, save them and close it.

I know how to get the list of drawings files from a selected folder but I'm stuck on how to open, rebuild, save and close the SolidWorks Drawings using Windows Form Application.

Detailed step by step help is expected.

SolidworksApi macros