A text message (or TEXT MSG) was a typed communication sent from one computer panel to another. Starfleet ships enabled this ability, which was sometimes used when verbal contact could be dangerous, or was impossible.
In 2153, after his apparent execution at the hands of Triannon religious extremists under D'Jamat (less technologically advanced than Humanity, they did not bat an eye when he claimed that the transporter was in fact a disintegration chamber) who had taken over the ship, Captain Jonathan Archer, needing to keep up the illusion that he was dead, contacted Doctor Phlox in sickbay from an access corridor at the bottom of the ship to ask how to disable the explosives the extremists had in their body. (ENT: "Chosen Realm")
In 2376, The Doctor modified his program to allow him to daydream. In one of these fantasies, he imagined participating in a briefing with several members of the USS Voyager crew regarding an upcoming away mission. During the briefing, Seven of Nine sent him a message via a PADD asking "DINNER TONIGHT?" while smiling at him seductively and giving him a longing look. A bit later in the briefing, Lieutenant B'Elanna Torres said that the away mission was starting to look more dangerous than they thought and suggested that it might be a good idea to have The Doctor on the team. Seven, jealous, sent The Doctor another message in blinking red letters-- "RESIST!" and then stated that she required his help in Astrometrics. (VOY: "Tinker Tenor Doctor Spy")
In 2379, after Shinzon had destroyed the viewscreen of the USS Enterprise-E, Captain Jean-Luc Picard hailed him and sent a text message to Deanna Troi, who was at the helm, to ram the Scimitar on his command. (Star Trek Nemesis)