In 1712 he was dispatched as ambassador to Turkey to negotiate the return of Swedish king Charles XII to Sweden. For this mission he was awarded with 25,000 tallers, an astronomically-high amount of money by those times' standards. In 1717 he signed the constitution of the Silent Sejm. For his support for the king, in 1725 he was made the Court Marshal of the Crown. The following year he became the Field Crown Hetman and held that post until his death in 1728.