As stated in the comments, there is no canon for Slenderman so the general question of whether or not he can be harmed is not answerable and will be subject to the plot of whatever series it is a part of. However, to answer your question on if it has happened, the answer is yes.
In the EveryManHybrid episode Ashen Waste, Evan charges slenderman with a baseball bat he has picked up earlier in the video. As often happens when in close proximity to Slenderman, the video distorts and we only see the indirect result of the encounter, which is that Evan is injured, bleeding from the mouth, and the gang moves quickly to get him to the car and to a doctor.
MarbleHornets also has some close encounters with Slenderman with equally fruitless results. The best example I can think of is when Jay meets Slenderman in the hotel room (I do not know which entry this is, I will update with a link when I can find it). It is not clear if Jay is pulled to Slenderman or if he charges him but it causes the video to cut and Slenderman is unharmed.
TribleTwelve has an instance of Noah attempting to shoot Slenderman in the video Mary Asher's Phone Call, but Noah is unsuccessful in inflicting any damage.
In some of the paranormal stories threads on Something Awful, stories were posted that even had Slenderman showing up in war zones like the Gulf War or World War 2, and in those cases he was able to terrorize and/or kill even soldiers armed with military weaponry.
So in all of the examples I am aware of, Slenderman is immune to harm from weapons, but this can change if someone writes a story that contradicts it.