You click the "melee" button and they drop the cannons and line out with the muskets. In the case of horse artillery the guns are carried as the light dragoons carry them
I've only tried it on horse artillery so far...
There are some issues though....
When you click melee, the horses and limers leave the battle, rendering the "horse" aspect usless...Its also impossible to change the reloading skill of muskets, as the crews use the same reloading and accuracy skill as they would for cannon. (Somehow range is unaffected, they have standard musket range)
They can be given pistols if you want?
So people interseted?