Preheat the oven to 400F and line a baking sheet with foil or parchment paper.
Working on a large cutting board, spread the bread slices with butter. Slice off and discard the crusts of the bread (or leave them out to dry for a day and mix in a blender to make bread crumbs). Flip the slices on the cutting board so the buttered slices face down. Divide the cheese among all the slices, top half of the slices with ham, and sprinkle with pepper. Assemble the slices into sandwiches two by two - one with ham, one without - so the exterior faces of each sandwich are buttered. Transfer to the baking sheet.
Bake for 10 minutes, until the sandwiches are golden on top. Remove the sheet from the oven (leave the heat on). Transfer the sandwiches to the cutting board and let rest for a few minutes, until cool enough to handle. Use a sharp bread knife to cut each sandwich into nine equal squares if the slices are large, four if they are medium. Flip each of the mini-sandwiches as you put them back on the baking sheet, and bake for another 7 minutes, until golden. Let cool for a few minutes and serve warm or at room temperature.