Considering the Federation’s…er, “less than stellar” performances when it comes to infantry actions, I’d always assumed that Starfleet’s military leadership had simply overlooked the possibility of using “primitive” projectile weapons against the Borg.
I suppose you could draw the analogy of Earth being attacked today, in the early 21st century, by aliens who possessed technology rendering them invulnerable to projectile weapons and explosives. How long would it take the Pentagon to discover that the aliens were extremely vulnerable to bronze swords, or a bone spear thrown from an atlatl?
I mean, at one point in the 23rd century, Sulu started to explain to Captain Kirk what a gun was—Although Kirk is known to had collected firearms in his apartment on Earth, but Sulu might not have known that at the time. Sulu’s actions might at least suggest that, by the 23rd century, projectile weapons might be so far removed from the public consciousness that military planners would consider them so obsolete as to be beneath consideration.
Just be glad Starfleet didn’t have any light cavalry brigades.
Although, it should be noted, Starfleet did develop a projectile weapon of their own, one time…the Tr-116. It was featured in an episode of Deep Space Nine, so it’s even canon.