In his youth his principal studies were in the modern and classical languages, which included French, English, Spanish, Italian, Arabic, Latin, Greek, Hebrew and Syriac as well as others, and it was to his precocious expertise in these that he owed his admission to the offices of the Ministry of the Marine (as the Navy was called in France) in 1706, where he became employed in correspondence. Having in 1709 succeeded (despite the previous failure of trained cryptographers) to decipher some coded letters seized from a Spanish frigate concerning the Archduke Charles of Austria (one of the pretenders to the Spanish throne, the other being Louis XIV's nephew the Duke of Anjou; this being the cause of the ongoing Wars of the Spanish Succession), by this astonishing feat he caught the attention of then Naval Minister Pontchartrain who named him cabinet secretary.