Is there any way or button for like an alternate attack to have Hoplites and Pikemen engage with sword rather than Pike or Spear?

Or do you just have to have them in standard formation and get up close?