2 step macro: assembly to part then save part as a STEP

macro: I've seen macros for: saving an assembly as a part with external surfaces and I've seen macros for creating STEP and IGES files.  I would like some help in generating a macro to do both.  The macro would generate a Part with external surfaces from the assembly, then it would open that Part file and save it off as a STEP/IGES.  thank you for your time

SolidworksApi macros