how to creat a middle face in cuboid automatically?

hello!

     i want to creat a middle face in cuboid automatically when i select a face of cuboid, and then delete the cuboid. 

     i used api "MakeOffset",but the face i want to offset can not be  face of cuboid. i do not know how to it. please help me!

SolidworksApi macros