In 1806 he was appointed secretary and archivist to the cabinet particulier of the emperor, whom he attended on his campaigns and journeys.
Palacky had received a modest appointment as archivist to Count Sternberg and in 182 9 the Bohemian estates sought to confer on him the title of historiographer of Bohemia, with a small salary, but it was ten years before the consent of the Viennese authorities.
At intervals from 1793 to 1801 Lang was closely connected with the Prussian statesman Hardenberg, who employed him as his private secretary and archivist, and in 1 797 he was present with Hardenberg at the congress of Rastadt as secretary to the legation.
When in 1805 the principalities became part of Bavaria, Lang entered the Bavarian service (1806), was ennobled in 1808 and from 1810 to 1817 held the office of archivist in Munich.
Motley acknowledges his indebtedness to Groen's Archives in the preface to his Rise of the Dutch Republic, at a time when the American historian had not yet made the acquaintance of King William's archivist, and also bore emphatic testimony to Groen's worth as a writer of history in the correspondence published after his death.