 In 1682 he was appointed ambassador to Venice, in which post he took with him as secretary his tutor, the connoisseur Roger de Piles.His success in this embassy was followed by further commissions, to Portugal (1685), Switzerland (1688-1698) and to Spain (1705-1709), where he played a prominent role during the War of the Spanish Succession and reorganized the Spanish army along the lines of the army of France.He presided over the seances that adjusted the differences between Victor Amadeus II, duke of Savoy, who was the new King of Sicily, and the Prince of Monaco, following the Treaty of Utrecht; the agreement was signed in Paris, 21 June 1714.