Macros that call different macros based on the file type

I want to make a macro that will call a different macro depending if the activeDoc is a part, an assembly, and will also give an error message if the activeDoc none of those. 

Thank you. 

SolidworksApi/macros